aggressiveLazyLoading doesn't work as document says
See original GitHub issuedocument says about aggressiveLazyLoading
:
When enabled, an object with lazy loaded properties will be loaded entirely upon a call to any of the lazy properties. Otherwise, each property is loaded on demand.
But the actual result is when I call method on an non-lazy propertiy, the lazy load is also triggered.
See also this stackoverflow question: http://stackoverflow.com/questions/24013855/lazy-loading-using-mybatis-3-with-java
Issue Analytics
- State:
- Created 8 years ago
- Comments:11 (10 by maintainers)
Top Results From Across the Web
What is Lazy Loading | Lazy vs. Eager Loading - Imperva
Lazy loading is the practice of delaying load or initialization of resources or objects until they're actually needed to improve performance and save...
Read more >Lazy Loading Fix for WP Rocket | WordPress.org
I just downloaded this amazing plugin and came across an issue where the force inline SVG option wasn't working because I was lazy...
Read more >Consider loading <img loading="lazy"> before they intersect ...
I suppose a single margin value, even if it's calculated by a heuristic way, it wouldn't be sufficient for all lazy load images...
Read more >Fix Lazy-Loaded Website Content | Google Search Central
To ensure that Google sees all content on your page, make sure that your lazy loading implementation loads all relevant content whenever it...
Read more >bLazy.js – A lazyload image script | dinbror - Bjørn Klinggaard
bLazy is a lightweight script for lazy loading and multi-serving images. It's written in pure JavaScript why it doesn't depend on 3rd-party ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I agree to change the default value to
false
.You are probably right. With aggressive lazy loading, the properties are loaded as soon as any method is called in the class. So if MyBatis calls a setter and does not disable the lazy load temporarily, all lazy properties will loaded.
I cannot confirm if versions before 3.1.0 were working differently back then. I remember that lazy load was quite aggressive, but I think it did not load all the lazy properties.
Disabling lazy loading while MyBatis is setting known properties is feasible, but I don’t think many people is using aggressive lazy load so it may not be worth the time.