Questions tagged [lazy-loading]

1

votes
1

answer
281

Views

Lazy load in Web API Core 2.2

I am having issues with the lazy loading. I have the following dbcontext. public virtual DbSet AccountGroupMst {get; set;} I have enabled the lazy loading. services.AddDbContext(x => x.UseSqlServer(Configuration.GetConnectionString('Test')) .UseLazyLoadingProxies()); Model, I have virtual and it is...
Suresh Kannan
1

votes
1

answer
35

Views

jquery.Lazy not loading all the images on scroll

I am using Lazy with groups of many (> 200) images. The html code for the images is built after many asyncrounous functions are called (a promise is activated when everything is ready). Lazy seems to work , the first images are loaded when scrolling, but sometimes only the images till a certain numb...
Paolo Benvenuto
0

votes
1

answer
4

Views

Lazy Load Stripe - Results in undefined error

I have the below code as part of my script which opens a stripe checkout. Trouble is that not many people will use it and stripe is slowing down my site, it's loading over 280kb on every page and making 40 http requests. I want instead to load the stripe.js only when someone clicks 'Buy'. This is th...
James Willson
6

votes
6

answer
215

Views

Should we disable lazy loading of Entity Framework in web apps?

I've heard that you have to disable the lazy loading feature of EF in web applications. (ASP.NET). Here and here, for instance. Now I'm really confused because I always thought that lazy loading should always be enabled. So now my question is: is it really a better idea to disable lazy loading in we...
1

votes
2

answer
28

Views

Angular redirect to parameter in lazy loaded module

I have some lazy loaded routes as following: const routes: Routes = [ { path: ':lang', loadChildren: './components/home/home.module#HomeModule', // redirectTo: 'en' }, { path: ':id/customers', loadChildren: './components/customers/customers.module#CustomersModule' }, { path: 'products', loadChildren...
Vahid Najafi
0

votes
0

answer
4

Views

Saving a entity with multiple lazy-associations

I have a scenario where I need to save an entity with multiple associations but I don't want to retrieve these associations if not needed. I will try to give a simple example: Entites: public class Foo { private Long idFoo; private String defaultMessage; /* Getters and Setters Ommited */ } public...
marcellorvalle
1

votes
0

answer
22

Views

Angular 5 opening a specific module in a new tab without loading all other modules

I am developing an angular 5 application using WebApi2 for the back-end. Until now I have had a single module application. But now we have decided to optimize our application by dividing it into multiple modules and use lazy loading. I am trying to move the Reports section of our application into...
Ankit Makhija
1

votes
1

answer
436

Views

Detect lazy loading in Entity Framework

I've been tasked with speeding up a giant codebase. One of the things I have noticed is that the team uses lazy loading everywhere. So much so that I think there's a lot to be gained by disabling it. There would be too much of an impact if I disabled it entirely so I'd rather do this in phases. This...
SaphuA
1

votes
1

answer
911

Views

Slow performance retrieving many nested entities using Entity Framework

I'm using Entity Framework 6 to retrieve an entity which has several navigation properties to deep nested entities. I'm facing a huge performance impact which has been highlited by logging Entity Framework's requests. I have hundred of records in my deepest entity (Geocoordinate) and retrieving a Se...
Ben
1

votes
1

answer
3.8k

Views

Row selection not working in primefaces (5.3) data table when the lazy loading is implemented, but it works without lazy loading

This is my data table: This is the controller: public class EventController { IEventService eventService; List items; private EventDTO selected; private Integer priorityIdSelected; private LazyDataModel lazyModel; public void init() { //items = eventService.getAll(); lazyModel = new EventLazyLoader(...
Diego Nieto
1

votes
1

answer
401

Views

Entity Framework avoid LazyLoading / already open DataReader issue

With an Union Query which runs several times successively I get UserlistSection objects for each alphabetic letter, if Users exist with the starting letter. So I get something like this: UserlistSection 'A' User User UserlistSection 'H' User UserlistSection 'Y' User User User But the query throws fo...
1

votes
1

answer
368

Views

Is the use of Session.buildLockRequest() to reattach entity to EntityManager a practical solution?

My problem is relatively simple: I have an entity with many lazily loaded Sets that I don't need all the time. Now I don't want to load everything eagerly, nor do I want to have several different getSlimEntity(), getFullEntity(), getEntityForSpecialOccasion() methods. What I'd like to do is having...
Markus Rohlof
1

votes
1

answer
2.9k

Views

Fetch Type LAZY still causes Eager loading Hibernate Spring data

I have created a simple Spring boot project with Spring data. I have a TagGroup Entity which has one to many relation with Tags. @Entity @Table(name = 'TAG_GROUP') public class TagGroup{ @OneToMany(fetch=FetchType.LAZY,mappedBy = 'tagGroup') private Set tagList; } The Tag Entity is as below @Entity...
DragonZoned
1

votes
3

answer
836

Views

onGlobalLayoutListener vs postRunnable

I am trying to do calculate view's x,y positions after completion of loading of activity. What I did is view.postDelayed(runnable, 2000) which is working fine. code reviewer is not happy with this and suggested to use OnGlobalLayoutListener to know about the completion of activity loading. Somehow I...
prago
1

votes
2

answer
676

Views

How to assign value to a Lazy Loading object?

I am new on lazy loading, but I want to be able to fill my lazy loading objects after it was created too. Is it possible? I am getting this error when I want to define a 'Lazy loading list' as a normal list I created: Cannot implicitly convert type: 'System.Collections.Generic.List' to 'System.Lazy>...
Hakan Erdogan
1

votes
1

answer
740

Views

How to generate folder with Lazy Loading Prefix (+) using angular cli?

We began to rewrite our angular 2 app using mainly angular-cli to generate components etc. The Problem now is, in order to adhere to the Style Guide, major component folders, which later may be loaded lazily should be prefixed with a '+'. Using --help of the cli generate instruction I could see two...
TardigradeX
1

votes
1

answer
230

Views

Are images in data-src attributed downloaded on page load?

In the Lazy Load plugin we mention the src of image in the data-original custom attribute. Now after the dom is ready javascript transfers the link mentioned in data-original attribute to src attribute. My question is, Would the browser start downloading the image only after javascript transfers...
user31782
1

votes
1

answer
271

Views

Entity Framework lazy loading in using statement

I am so curious, when I went to deep into Entity Framework and will be glad to help me understand about lazy loading in this example which I show here: public partial class Customer { public int CustomerID { get; set; } public Nullable PersonID { get; set; } public Nullable StoreID { get; set; } pub...
www1986
1

votes
1

answer
177

Views

Combining lazy and eager loading in EF

I am wondering if it is possible combining lazy and eager loading. For example, I have one Web Api controller with GET method that does not need to load related entity data, but I have also another Web Api controller and its method GET needs to retrieve data from related entity. Is it good practice...
ruud
1

votes
1

answer
561

Views

Force Image Load on Lazy Load XT

Any idea how to Force Image Load of specific div of Lazy Load XT jQuery plugin ? I mean data-src='' image will load automatically after page load without page scroll or viewport. This plugin only loads images on the following events load orientationchange resize scroll. But cannot find any document...
Aariba
1

votes
1

answer
1.1k

Views

Angular2 Lazy loading Fails with a shared module

I've created an AccountModule that successfully lazy loads, but when I add my SharedModule to the AccountModule my app seems to forget all of my eagerly loaded modules and I get the error: Component FoodComponent is not part of any NgModule or the module has not been imported into your module. Where...
Nate May
1

votes
2

answer
420

Views

angular 2 webpack 2 lazy load module throwing template parse error

im using webpack 2.2.0 . my appmodule loads properly and also on route the chunk is downloaded but it throws template parse error 'Can't bind to 'ngIf' since it isn't a known property' if im trying to load commonmodule in dynamic module it throws duplicate error Dynamic route (app-routing): { path:...
janIreal23
1

votes
1

answer
444

Views

JPA+Hibernate force JPA not to use Proxies on Lazy loading

We are using JPA + Hibernate. I have some Many-to-one mappings which are lazy loaded. In Service, I Initiallize the Many-to-one objects by calling their getter method. but proxy gets assigned to parent VO and not actual VO Object. My Question is, Is there any way in JPA to force to use no proxy Stra...
Abhijeet Kale
1

votes
2

answer
330

Views

is there a way lazy load a component in angular 2 dart?

I have a component that uses another component with a ngIf statement. I would like to only load the second component once the ngIf evaluates to true. EDIT: found an article that can almost do what I need: https://medium.com/@matanlurey/lazy-loading-with-angular-dart-14f58004f988. However, after t...
Jonathan
1

votes
2

answer
844

Views

Angular <custom-component> doesnt work on lazy-loaded modules

I have created a custom component which works fine on app.component, but when the is used in lazy loaded module it gives an error: Error: Template parse errors: 'my-component' is not a known element: 1. If 'my-component' is an Angular component, then verify that it is part of this module. 2. If '...
Hese
1

votes
1

answer
124

Views

Hibernate Batch Update - Entities are not updated

I have a batch process which is recalculating data for a set of entities. The entities list is fetched from DB by hibernate: @Transactional(propagation = Propagation.REQUIRES_NEW) public void recalculateUserData(Long userId){ List data = repository.getAllPendingRecalculation(userId); List recalculat...
Tomer A
1

votes
1

answer
2.2k

Views

Angular 2 - Wait for data init from service

There are 2 services: DataService - gets data from the server CacheService - subscribes to DataService and holds mapped data and component ComponentA - Injects CacheService and has foo function that handles cached data My question is - How do I ensure that my CacheService is done with data when my...
Xquick
1

votes
1

answer
1.4k

Views

Optimizing video loading on web page

I have a single page application which contains multiple video tags in each section. Height of the window is height of the section. Each tag has a different videos with the format of MP4. I want to load these videos quickly without impacting the page load time so I have tried it to load by lazy load...
Gowtham E
1

votes
1

answer
714

Views

Lazy load a directive into a component in a page IONIC 3

I have a page that uses a component and in the template of that component I call a directive. I have imported the directive into a shared module that is that added to the page.module set up. But the directive is not registered on the component. How can I get this to work. PAGE -> COMPONENT -> DIRECT...
Ross Rawlins
1

votes
1

answer
2.5k

Views

Router infinite loop with second canActivate guard on lazy-loaded modules

I have an angular 4.3.6 application with lazy-loaded modules. Here is a partial root router: const routes: Routes = [ { path: '', redirectTo: 'fleet', pathMatch: 'full' }, { path: '', component: AppComponent, canActivate: [AuthenticationGuard], children: [ { path: 'fleet', loadChildren: './modules/f...
msanford
1

votes
1

answer
440

Views

EF Lazy Loading is Disable, But Still EF Loads Full Graph

I have disabled lazy loading of EF 6.1 using the following code public MyContext() : base('DefaultConnection') { this.Configuration.LazyLoadingEnabled = false; this.Configuration.ProxyCreationEnabled = false; } Then I load my object using the following line. T result = (T)context.Set().Find(id); Whe...
Sisyphus
1

votes
1

answer
233

Views

ionic require login on lazy loaded page for website

I have a simple Ionic3 app with a couple of lazy loaded pages (using IonicPage) and a login page. I want to block all access to any page unless the user is first logged in. Knowing that this is to build a website version and not a cordova version, what is the best way to prevent the user for simply...
Guillaume
1

votes
2

answer
335

Views

Lazy loading 3rd party component in loaded page (Ionic)

The app working when i run ionic cordova run android --device but gives error when i try ionic cordova run android --prod --release I am trying use ng2-qrcode into my lazy loaded page Error: Unexpected value 'QRCodeComponent in D:/qrstore/node_modules/ng2-qrcode/dist/ng2-qrcode.d.ts' declared by...
lijnam
1

votes
1

answer
187

Views

Entity Framework - Navigation Property Not Eager/Lazy Loaded?

I have the following entites: public class Ticket { public int Id { get; set; } public string RequestBy { get; set; } public int PriorityId { get; set; } public ApplicationUser Requester { get; set; } public Priority Priority { get; set; } } public class ApplicationUser { public ApplicationUser() {...
adam78
1

votes
3

answer
507

Views

How can I load Child entities dynamically in Entity Framework 6

I have a Provider class and an Article one. Article has a int ProviderId{get;set} and a public virtual Provider Provider {get;set;} properties. I know about Lazy loading and why I can't access the Provider property in Article outside the context but I have a generic method that returns the next T li...
legomolina
1

votes
1

answer
166

Views

Angular - lazy loading from custom folder

I have Angular 4 application with several lazy loaded modules. I working as expected as standalone (in local development server), however when I try to deploy it using Django application... Main page - index.html is generated by Django view from the built index.html by angular-cli, all pathing to bu...
bensiu
1

votes
1

answer
170

Views

Circular dependency when Lazy Loading between BL and BE

I have basically a business layer, a business entities and a data access (SQL) layer. The business entities layer is referenced by business layer and data access layer. I've made a test to set lazyloading in wich one I call function that fills entities from business layer to entity layer. Issue: cir...
clement
1

votes
1

answer
197

Views

Angular 7 loading the after login component very slowly

The load of the after login component in my angular 7 application is so slow, the first time a user login to the app. But if he logout and login back again without closing the browser, the speed would be better. The routing tree is like the following: On startup of the app, we have the login compone...
alim1990
1

votes
1

answer
58

Views

How to unproxy child objects from org.springframework.data.repository.CrudRepository descendant

I have created a many-to-many relationship of users to projects in a MySQL database and have used hbm2java (the hibernate tool to generate java classes from the data base tables). Since I'm using the gradle plugin org.hibernate.gradle.tools.Schema I don't have a hibernate.cfg.xml. I can fetch and co...
user3477493
1

votes
1

answer
49

Views

Type hints of lazy loaded modules

In angular I want to lazy loaded some modules like amcharts. I know how to do that but what about type hints in editor? Here is my code: import {AfterViewInit, Component, NgZone, OnInit} from '@angular/core'; // import * as am4core from '@amcharts/amcharts4/core'; // import * as am4charts from '@amc...
piernik

View additional questions