Giter Site home page Giter Site logo

Performance Bottleneck about birt HOT 10 CLOSED

giangianoulas avatar giangianoulas commented on August 16, 2024
Performance Bottleneck

from birt.

Comments (10)

hvbtup avatar hvbtup commented on August 16, 2024 1

Hmm, I don't think changing the type to a LinkedList instead of ArrayList would help. In both cases removing elements takes O(n).
Shouldn't it be a HashMap or something like that instead?

If you are profiling anyway, it would also be interesting to see the average element count of the structure.

Maybe the size is more of a problem. Looking at the code, it seems to me that registering/deregistering only takes place in the methods of DataSourceQuery class.

Maybe there is some kind of memory leak like forgetting to call deregister somehow or delaying the call too long? That would cause the structure to grow and grow, if a big report uses several thousands or millions of queries. (Well, with a classical remote RDBMS, such a report would be a candidate for refactoring anyway, because it'd run forever and slow the DB down)

Because otherwise I cannot understand why a few (or a few dozens) queries which are open at the same time can cause the structure to grow to a significant size n.

from birt.

speckyspooky avatar speckyspooky commented on August 16, 2024

Yes, I confirm the idea of Henning. I have also some reports which use many queries in combination with loops and with large row count (1Mio.) but I have never seen this problem.

Do you got the problem with the latest BIRT version 4.15?

from birt.

giangianoulas avatar giangianoulas commented on August 16, 2024

There was indeed a memory leak. In DataSourceQuery#execute elements were added but never removed.
Also there was a unnecessary big syncronized block.

I agree that this report needs a redesign, but it is not that easy to be done.
I am using Birt 4.12.0 but it seems to be ancient problem

from birt.

hvbtup avatar hvbtup commented on August 16, 2024

Can you provide a PR?

from birt.

giangianoulas avatar giangianoulas commented on August 16, 2024

giangianoulas@3e2e587

from birt.

hvbtup avatar hvbtup commented on August 16, 2024

Hmm, the code looks OK at first sight, but you need to create a pull request and sign the ECA.

I'm not sure about the call to super.equals in the equals method. Is that correct and is it necessary at all?

BTW did you test it with your huge report and did it reduce runtime?

from birt.

giangianoulas avatar giangianoulas commented on August 16, 2024

Ok all done
equals and hashCode was not necessary so i removed them.

Sadly i can produce this amount of data because it is quite complex and i don’t have the business knowledge for this.

I will come back to this and comment when i will have something at hand

from birt.

merks avatar merks commented on August 16, 2024

@giangianoulas

FYI, a build with your changes is available here:

https://download.eclipse.org/birt/updates/nightly/latest

from birt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.