Hypersistence Optimizer Issues: Critical: EagerFetchingEvent#2220
Conversation
…hing which, not only that is more efficient, but is way more flexible when it comes to fetching data.
|
Eager also prevents N+1 fetches which can be very bad for performance. I'm fairly certain where we use EAGER it is intentional and necessary, but I'll have to review the specific cases that you uncover. Edit: |
|
Linking this to #2263 |
|
Associating with OHDSI/StandardizedAnalysisAPI#54 |
Consider using lazy fetching which, not only that is more efficient, but is way more flexible when it comes to fetching data. For more info about this event, check out this User Guide link - https://vladmihalcea.com/hypersistence-optimizer/docs/user-guide/#EagerFetchingEvent
I left one reported below as is because it seem eager is necessary here to avoid no session error i encountered.
The [daimons] attribute in the [org.ohdsi.webapi.source.Source]
This article points out alternatives and i concluded keeping eager is right thing to do in this case.
https://www.baeldung.com/hibernate-initialize-proxy-exception
Reran report
BEFORE
165 issues were found: 1 BLOCKER, 80 CRITICAL, 40 MAJOR, 44 MINOR
AFTER
137 issues were found: 1 BLOCKER, 52 CRITICAL, 40 MAJOR, 44 MINOR