TIBCOSoftware / jasperreports

JasperReports® - Free Java Reporting Library
https://community.jaspersoft.com/downloads/community-edition/
GNU Lesser General Public License v3.0
1.03k stars 397 forks source link

Reduce memory usage and improve performance. #409

Open yoseph-phillips opened 9 months ago

yoseph-phillips commented 9 months ago

Reduce memory usage and improve performance.

Most important enhancement is in setDependentElements() If A is dependent on B and B is dependent on C then A does not need to be dependent on C.

moveDependantElements() Moves common calculations out of the loop and removes the nested call to moveDependantElements()

Breaks early in the prepareElements() loop if no further work is required.

lalo-mx commented 9 months ago

Consider keeping the previous formatting style, more easy to review

yoseph-phillips commented 8 months ago

Consider keeping the previous formatting style, more easy to review

Formatting was the same except that my IDE had replaced tabs with spaces. I have made it replace the spaces with tabs again so that people don't need to click on ignore whitespace in GitHub when reviewing.