Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FileContents.getLines performance fix #351

Closed
wants to merge 1 commit into from
Closed

Conversation

isopov
Copy link
Contributor

@isopov isopov commented Oct 31, 2014

Inspired by #136 and #346 part. I was testing on the spring-boot project with the following config:

<module name="TreeWalker">
    <module name="LeftCurly"/>
    <module name="FallThrough"/>
    <module name="CustomImportOrder"/>
    <module name="LineLength"/>
    <module name="GenericWhitespace"/>
    <module name="NoWhitespaceAfter"/>
    <module name="NoWhitespaceBefore"/>
    <module name="OperatorWrap"/>
    <module name="WhitespaceAfter"/>
    <module name="WhitespaceAround"/>
</module>

Using checkstyle before this fix gived me 71 MB of String[] allocations. After this fix Only 2.4 MB of String[] were allocated. Execution time (that is not stable and was not properly measured) reduced insignificantly - both executions were less than 5s.

@daniilyar
Copy link
Contributor

I've tested this, fix looks good and really reduces garbage overhead.

@romani
Copy link
Member

romani commented Nov 2, 2014

merged as FF, thanks a lot.

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.

None yet

3 participants