CGImage/UIImage lazily loading on UI thread causes stutter

I’ve had the same stuttering problem, with some help I figured out the proper solution here: Non-lazy image loading in iOS Two important things to mention: Don’t use UIKit methods in a worker-thread. Use CoreGraphics instead. Even if you have a background thread for loading and decompressing images, you’ll still have a little stutter if … Read more

What is Lazy Loading?

It’s called lazy loading because, like a lazy person, you are putting off doing something you don’t want to. The opposite is Eager Loading, where you load something right away, long before you need it. If you are curious why people might use lazy loading, consider an application that takes a LOOOOONG time to start. … Read more

Spring, Hibernate, Blob lazy loading

I’m confused. Emmanuel Bernard wrote in ANN-418 that @Lob are lazy by default (i.e. you don’t even need to use the @Basic(fetch = FetchType.LAZY) annotation). Some users report that lazy loading of a @Lob doesn’t work with all drivers/database. Some users report that it works when using bytecode instrumentation (javassit? cglib?). But I can’t find … Read more

Hibernate count collection size without initializing

A possible solution other than queries might be mapping children with lazy=”extra” (in XML notation). This way, you can fetch the Parent with whatever query you need, then call parent.getChildren().size() without loading the whole collection (only a SELECT COUNT type query is executed). With annotations, it would be @OneToMany @org.hibernate.annotations.LazyCollection( org.hibernate.annotations.LazyCollectionOption.EXTRA ) private Set<Child> children … Read more

Entity Framework Code First Lazy Loading

This is wrong “virtual” keyword is used for not loading the entities unless you explicit this (using an “Include” statement) Lazy Loading means that entities will be automatically loaded when you first access collection or navigation property, and that will happen transparently, as though they were always loaded with parent object. Using “include” is loading … Read more

How to query data for Primefaces dataTable using lazy loading and pagination

In case of very large resulting lists, the Java-side counting and the sublisting operations can be dangerous for the memory usage and consequently also on the performance side. Instead, I usually go with the following approach: use 2 queries, one for counting the filtered resultSet (I let the db do the count), and another one … Read more