Questions tagged [lazy-loading]

For programming questions about "lazy loading", a design pattern that defers initialization of an object until the point at which it is needed.

Lazy loading is a commonly used in computer programming to defer initialization of an object until the point at which it is needed. It can contribute to efficiency in the program's operation if properly and appropriately used. The opposite of lazy loading is Eager Loading.

5366 questions
2
votes
1 answer

angular2 lazy loading or pagination on scroll

How create true lazy loading? Problem is next: i have create lazy loading on scroll. I use infinite-scroll on scroll fires event and i get next page and concat with array on page1. But i think it not true because i increasing array. Help please how…
user3875721
2
votes
0 answers

Angular 2 Universal lazy modules not working

So I first had my entire project working without Angular's universal (server-side rendering) and then I started off with the Angular Universal starter kit, and moved my project into the appropriate directories. Everything works now, except for any…
Gerardlamo
  • 1,035
  • 10
  • 19
2
votes
1 answer

Lazy loading Angular modules with Webpack

I'm trying to get lazy-loaded Angular modules working with Webpack, but I'm having some difficulties. Webpack appears to generate the split point correctly, because I see a 1.bundle.js getting created that contains the code for the child app, but I…
flimsy
  • 105
  • 8
2
votes
1 answer

In Hibernate JPA how to transparently solve " failed to lazily initialize a collection of role " exception

I am migrating a huge project from Eclipselink to Hibernate JPA that running on Wildfly 10.0 Once moved to Hibernate I got the famous exception " failed to lazily initialize a collection of role " I found many solutions for this issue like these…
Samy Omar
  • 770
  • 14
  • 29
2
votes
1 answer

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…
Aariba
  • 1,104
  • 5
  • 17
  • 47
2
votes
3 answers

Hibernate ManyToOne FetchType.LAZY is not working?

I am using spring 4.1.4.RELEASE + hibernate 4.3.6.Final, here is my entity code: public class BaseEntity implements Serializable { } public class MarketInfo extends BaseEntity { @Id @GeneratedValue(strategy = GenerationType.AUTO) …
seaguest
  • 2,222
  • 5
  • 21
  • 38
2
votes
1 answer

Why does LINQ SelectMany ignore includes? (and in fact removes loaded data)

var result = ParentTable.Set .Include("Children") .Include("Children.GrandChildren") .SelectMany(p=>p.Children) .Where(c=>c.GrandChildren.Any(whatever)) will return null, even though var result =…
Jason Coyne
  • 6,179
  • 7
  • 35
  • 64
2
votes
1 answer

Lazy loading with wpf Data Grid

Initially I am populating 100 rows in Data grid, when user scroll the grid rows, I want to populate another 100 rows. I am using wpf data grid, I have not found any event of data grid that I can catch to accomplish this task. Then I have used scroll…
Muhammad Akhtar
  • 50,838
  • 36
  • 132
  • 186
2
votes
1 answer

Idiomatic way to lazy-load with mobx

What is the current idiomatic way to lazy load properties when using MobX? I've been struggling with this for a few days, and I haven't found any good examples since strict mode has become a thing. I like the idea of strict mode, but I'm starting…
Jakke
  • 287
  • 1
  • 2
  • 11
2
votes
2 answers

JPA (Hibernate) - Session/Transaction and lazy loading

I have a Java EE project and the MySQL database is managed with an ORM. I worked a lot with Hibernate to learn what I am doing wrong and I think I understand session/transaction, but I do not know how I can solve this in my case/architecture. I have…
Tim
  • 12,894
  • 35
  • 105
  • 158
2
votes
1 answer

Spring Hibernate not to fetch the child data always

I have two tables Devices and Rules, a device can have n number of rules so they exist in One to Many Associations and vice versa. I am using Spring+Hibernate+REST , i never want to fetch the Rules data when i fetch Devices Data, when i use lazy…
user1058913
  • 321
  • 1
  • 4
  • 17
2
votes
0 answers

Spring 4 lazy-init not honoured for org.springframework.jms.listener.adapter.MessageListenerAdapter?

I'm trying to convert a Spring 3 app to Spring 4 (4.3.2.RELEASE) but I can't get org.springframework.jms.listener.adapter.MessageListenerAdapter to lazy load anymore. To isolate the problem I removed all references to the following bean def but it…
Roger
  • 21
  • 1
2
votes
1 answer

Angular 2 lazy loaded module initializing multiple times when navigating routes?

Using RC5 I have a lazy loaded route configured: {path: STATE.PROFILE, loadChildren: 'app/profile/profile.module' }, which points to this module: @NgModule({ imports: [CommonModule, FormsModule, routing], declarations: [SelectProfileComponent,…
Sherman Szeto
  • 1,975
  • 4
  • 14
  • 25
2
votes
3 answers

Entity Framework .include Performance Issue

I have the below query which is tremendously slow. I am new to Entity Framework and I believe it has got to do something with Eager Loading, Lazy Loading or Explicit Loading. Need help optimize the below C# statement. var queryResult =…
Kashif Khan
  • 667
  • 2
  • 10
  • 27
2
votes
1 answer

Entity framework lazy loading not working in 1..* unidirectional relationship

I have the following Entities public class A { public int AId {get; set;} } public class B { public int BId {get; set;} public virtual A Child1 {get; set;} public virtual A Child2 {get; set;} } with the following…
olif
  • 2,781
  • 1
  • 21
  • 22
1 2 3
99
100