Closed BoykoAlex closed 11 months ago
CC: @martinlippert
For some background: I experimented with the IDE support that we are working on to make sure we can deal with the various situations. From my experience, this parsing performance is quite important for the interactive experience in the IDE, so would be good to address this topic somehow. The large file seems a bit unrealistic for real use (for sure), but it helped me quite a bit to uncover those bottlenecks that also slow down the parsing experience for smaller files (but obviously on a smaller scale).
And my assumption is that improving this would also help making every other use case faster as well... :-)
The project having PlSqlParser.java - the java source with 160K lines of code plsql.zip
Thanks for the pointer @BoykoAlex . I think replacing this regex with iteration is totally feasible.
@jkschneider Another interesting thread dump that causes project reconciling to go a bit crazy on our end: https://github.com/spring-projects/sts4/issues/825#issuecomment-1259086573
@BoykoAlex Are you still seeing these performance issues? It's been a while with quite some changes to the parser since; two of them linked above. I'm looking to prune the backlog a bit, so trying to decide if we should close or revisit.
@timtebeek We moved away from using OpenRewrite for the performance critical parsing pieces (reconciling Java sources), so the parser performance is not a critical part for us anymore.
Good to know! Then I hope you don't mind me closing this one, given the large amount of changes since, and how you are now unlikely to notice even if there are further improvements.
@timtebeek But nevertheless always interested to hear about the latest improvements in this area!!! :-)
@timtebeek Oh, and not to forget that we continue to use OpenRewrite not only when running upgrade recipes from within the IDE, but also the quick fixes, so improvements in this space are still highly welcome and totally awesome, so please keep us in the loop here.
Will keep you posted! It's usually Knut who makes performance improvements everywhere he looks; it's just that we only have one Knut. :)
Parsing a very large Java file (~160K lines of code) takes much longer than parsing the same file with JDT java parser.
The java file that takes long is: PlSqlParser.java from the attached project.
The issues originated here: https://github.com/spring-projects/sts4/issues/825
The code seems to be stuck mostly in: