Comments (10)
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.
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.
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.
Can you provide a PR?
from birt.
from birt.
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.
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.
FYI, a build with your changes is available here:
https://download.eclipse.org/birt/updates/nightly/latest
from birt.
Related Issues (20)
- BIRT 4.15 milestone: eclipse-designer (all-in-one) shows error on 1st report and the report will be hidden after restart (eclipse-restart-option) HOT 1
- BIRT 4.15 rcp-designer: "XML Source"-tab of report not available (empty page due to NullPointerException, provider = null) HOT 29
- BIRT 4.15 milestone, "Build Project" shows 48 JS-library issues due to missing APIs of Rhino 1.7.14 (dependency update #1567) HOT 8
- "New Preview Prototype" tab HOT 7
- OSGi-version: BackgroundImageInformaton, could produce "NoSuchElementException" due to unchecked iterator-element HOT 2
- Very misleading exception stacktrace when an image file is not found at runtime HOT 6
- BIRT 4.14: HTML-Output: Text-content wrong parsed/Changed parsing behavior: element "TEXT", type "HTML", tag "script", content, script-string with internal "HTML-tag" HOT 3
- BIRT 4.15: SVG images won't be displayed on HTML-preview which are embedded on TEXT-element (type HTML) HOT 6
- 4.16 Releng HOT 6
- BIRT 4.16 opening ceremony HOT 4
- Should the github action archive so much stuff? HOT 14
- Invalid operation: Can not access encrypted password from script HOT 12
- Derby missing from runtime HOT 34
- java.lang.NullPointerException: Cannot invoke "org.w3c.tidy.Attribute.setNowrap(boolean)" because "org.w3c.tidy.AttributeTable.attrContent" is null HOT 2
- DOCX emitter doesn't set language for correction HOT 14
- Line Break in DOCX HOT 4
- XLSX Emitter "Cannot add merged region" - again HOT 9
- Preview and auto export of reports is truncating data for Scatter chart of size 11x17 HOT 5
- How to Display Dynamic Images
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from birt.