Skip to content

[persistence] Optimize result parsing in GenericPojoDao::getV2#1804

Merged
anshul98ks123 merged 2 commits intomasterfrom
TE-optimize-getV2-parsing
Feb 19, 2025
Merged

[persistence] Optimize result parsing in GenericPojoDao::getV2#1804
anshul98ks123 merged 2 commits intomasterfrom
TE-optimize-getV2-parsing

Conversation

@anshul98ks123
Copy link
Collaborator

Issue(s)

Investigate and fix anomalies list API slow response

Description

Optimizes parsing logic of query result in getV2 method of GenericPojoDao

Testing

  • Existing UTs & Integration Tests
  • Manual test

@vercel
Copy link

vercel bot commented Feb 19, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
thirdeye ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 19, 2025 9:26am

final List<E> results = new ArrayList<>();
final List<E> results = new ArrayList<>(entities.size());
if (CollectionUtils.isNotEmpty(entities)) {
Class<E> beanClass = (Class<E>) daoFilter.getBeanClass();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

final here is actually important, it may help the compiler a lot

btw were you able to measure the cost of the casting ? in this case JIT should be able to figure this out
anyway code looks good.

let's have a working session about benchmarking and profiling if you're interested

@anshul98ks123 anshul98ks123 merged commit 629b7da into master Feb 19, 2025
13 checks passed
@anshul98ks123 anshul98ks123 deleted the TE-optimize-getV2-parsing branch February 19, 2025 10:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants