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

Vue.js 2.0 Lazy Loading

I'm trying to Lazy Load my components in Vue.js 2.0 (in a Laravel 5.3 project). According to the documentation I should do it like this: Vue.use(VueRouter); const Forum = resolve => require(['./Components/Forum/Forum.vue'], resolve); export…
Jenssen
  • 1,486
  • 3
  • 24
  • 59
2
votes
0 answers

Some times oc.lazyLoad not working properly in angularjs?

Am working on the Angularjs project in which there is requirement to load the css and js files on demand, For this purpose i used the oc.lazyLoad library in angularjs, but some times pages loaded fines and some times it produce errors with loaded…
Tarnjeet Singh
  • 744
  • 1
  • 9
  • 29
2
votes
2 answers

Facebook Comments Widget lazy loaded with Angular 2

In short: The Facebook Comments Widget only gets loaded the first time the page is accessed, after that it does not load anymore. I need a way for the script and anything else to be executed again just like it was executed the first time the page…
2
votes
1 answer

What is wrong with this lazyload function logic to support print media?

I am using lazy load function for images in a section of my web page. (Basically the images currently shown in the viewport are fetched. Rest are not fetched from the server.) The following JavaScript works. Usage Example: img class="lazy"…
nzkks
  • 86
  • 7
2
votes
1 answer

Is it possible to Lazy load a component in Angular 2 like we can with a Module?

I have learnt that we can lazy load modules in an angular 2 application. But similarly is it possible to lazy load simply a component(instead of wrapping it in a module) : https://angular.io/docs/ts/latest/guide/ngmodule.html#!#lazy-load Edit How to…
jackOfAll
  • 2,350
  • 4
  • 18
  • 38
2
votes
0 answers

Spring Data JPA: Switch between EAGER and LAZY when reading an object

My model looks like this: Customer (Name, Age, ..) Project Rent Fault (and maybe deeper) So each Customer has a list of projects. Projects have a list of rents. And rents have a list of faults. Links are bidirectional. Now I…
2
votes
2 answers

Angular 2 : How to export a Component of Lazy Loaded Module

I have a component 'A' which is added in Module M1 and exported which is being lazily loaded , Now I have another module M2 which has component 'B' which is using A (selector) So as M1 is lazy loaded I'm getting error as Component A is not a part…
sudhir
  • 1,289
  • 3
  • 23
  • 39
2
votes
1 answer

Should I turn off lazy loading in Entity Framework?

So I've been getting this feeling that I should turn off lazy loading, for two reasons: queries become non-atomic, so could result in concurrency errors. me or another programmer could end up causing a huge performance impediment. Of course, both…
Rei Miyasaka
  • 6,796
  • 5
  • 37
  • 65
2
votes
1 answer

Lazy loading returns equal records

I have entities: public class Document : PersistentObjectBase { public virtual long? FolderId { get; set; } }
Sergey Metlov
  • 23,436
  • 26
  • 87
  • 142
2
votes
1 answer

How to associate Hibernate session to JmsListener method

I have a SpringBoot app using SpringData to persist data on an Oracle DB and spring-boot-starter-activemq to handle JMS queues. I am exposing a DELETE Rest WebService which takes a while. And I don't want my users to hang on the response. So I added…
Olivier
  • 1,524
  • 1
  • 18
  • 27
2
votes
1 answer

Angular 2 CLI - 3rd party JS plugins lazy loading

https://github.com/ocombe/ocLazyLoad I have used this for Angular 1, is there any alternative plugins like this to work for Angular 2? I want to include the 3rd party Javascript plugins on demand (lazy-load), into my Angular 2 project. So far no…
Faizal
  • 702
  • 1
  • 6
  • 23
2
votes
1 answer

Dynamic/lazy imports in Elm

I would like to lazily import the definition of a function in Elm. The use case is the browser, where I may have multiple views that I do not need to render for initial page load, so I'd like to defer those network requests to speed up initial…
Alexander Otavka
  • 796
  • 1
  • 6
  • 9
2
votes
2 answers

Lazy loading not possible with DI?

does dependency injection make it impossible to lazy load dependencies? because of the fact that you need to pass instances to the constructor, you cannot make the instances later
xpedobearx
  • 557
  • 2
  • 6
  • 12
2
votes
2 answers

Angular 2 lazy loading - inputs/outputs

I am trying to pass inputs/outputs to the lazy loaded component, but I'm not sure how I can do that. If it's not lazy loaded, I know that I can do that like this. test.ts testdata: string; ngOnInit(){ this.testdata =…
2
votes
1 answer

Using Virtual on navigation properties

I want to know when we use the key word virtual with navigation properties (I learnt it's for lazy loading) but I'm reading a tutorial in https://docs.asp.net/en/latest/data/ef-mvc/intro.html that creates an asp.net web application core and they are…
1 2 3
99
100