Community
Participate
Working Groups
build 3.3RC2 It take around 20sec to format GenericTypeTest on my computer. I profile the execution of the format operation. The format operation last 17sec and 12 sec are spend inside CharOperation#indexOf(char[], char[], boolean, int, int). The problem could be in Scribe#hasNLSTag() and Scribe#printLineComment() which call indexOf() to search an nls tag from the current position to the the end of the file. The fact that the file is big and that there is no real nls tag inside could be responsible of the slowness.
Created attachment 68989 [details] Proposed fix David, could you please let me know if it is faster with this patch? If yes, I'll request reviews for RC3.
Maxime, Jérôme and Frédéric, please review. If ok, I'll tag it as 3.3RC3.
Adding a new performance test suite with one test formatting a big file (GenericTypeTest.java), here are the results I got: 3.2 15,776.5ms RC2: 15,779.7ms patch: 3,586.0ms So, sounds like a good candidate for global fingerprints :-)
Obviously +1 for 3.3 RC3 with previous performance results...
+1 for 3.3 RC3
Here are the results I got when formatting is done on a medium file (Parser.java: 225176 chars): 3.2 1568.7ms RC2: 1567.1ms patch: 684.4ms
+1 for rc3
Philippe, please review
Patch looks good.
Released for 3.3RC3
Created attachment 69071 [details] Performance tests for formatter Add new performance test suite: FullSourceWorkspaceFormatterTests. This suite has 2 tests: - testFormatDefault: format Parser.java file (225176 chars) ten times - testFormatDefaultBigFile: format big file GenericTypeTest.java (1297242 chars) once 10 measures (ie. start/stop) are done for each test with a warmup of 5 iterations...
(In reply to comment #11) > Created an attachment (id=69071) [details] > Performance tests for formatter Released for 3.3 RC3
Verified for 3.3RC3 using I20070601-0010. When folding is enabled the code is formatted in the editor after 20 sec. When folding is disabled the code is formatted after 5 sec.