We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I noticed a significant performance drop with Java Rewrite with regards to highlighting numbers.
One of the benchmarking files used to track performance is a syntax_test_perf_numbers.java with 10k lines of following code snippet.
0x1.; 0x.1a2f; 0x1.a2f; 0x1ffp+1023 0x1ffp+_1023_; 0xd.aP-1074 0x_1_f_._a_d_P-_10_74_; 0D + 12345D + 12345D + 12_34_5_D - _12_34_5D - 12a45D; 0F + 12345F + 12345F + 12_34_5_F - _12_34_5F - 12a45F; 1. + 1_. + 1_2. - _1.; 1.D + 1_.D + 1_2.D - _1.D; 1.2 + 1_.2_ + 1_2.3_4 + 1_2_._3_4_ - _1.5; 1.2d + 1_.2_d + 1_2.3_4d + 1_2_._3_4_d - _1.5d; 12e34 + 12e+3_ + 1_2e3_4 + 1_2_e3_4_ + 1_2_e_3_4 + 12e+34 + 12e-34 + 12e+3_4 - _12e34; 12e34f + 12e+3_f + 1_2e3_4f + 1_2_e3_4_f + 1_2_e_3_4f + 12e+34f + 12e-34f + 12e+3_4f - _12e34f; 12.e34 + 12.e+3_ + 1_2.e3_4 + 1_2_.e3_4_ + 1_2_.e_3_4 + 12.e+34 + 12.e-34 + 12.e+3_4 - _12.e34; 12.e34f + 12.e+3_f + 1_2.e3_4f + 1_2_.e3_4_f + 1_2_.e_3_4f + 12.e+34f + 12.e-34f + 12.e+3_4f - _12.e34f; 12.34e56 + 12_.34_e+5_ + 1_2.3_4e5_6 + 1_2_.3_4_e5_6_ + 1_2_._3_4e_5_6 + 12.34e+56 + 12.34e-56 + 12.34e+5_6 - _12.34e+5_6; 12.34e56f + 12_.34_e+5_f + 1_2.3_4e5_6f + 1_2_.3_4_e5_6_f + 1_2_._3_4e_5_6f + 12.34e+56f + 12.34e-56f + 12.34e+5_6f - _12.34e+5_6f; .2 + .2_ + .3_4 + ._3_4_; .2d + .2_d + .3_4d + ._3_4_d; .34e56 + .34_e+5_ + .3_4e5_6 + .3_4_e5_6_ + ._3_4e_5_6 + .34e+56 + .34e-56 + .34e+5_6; 23.45 + 23.45F + 23.45d; .01 + .02e3+.02e3F; 23.45e67+23.45e+6F+23.45e-67D; 0b101101 + 0b10_11_01 + 0b10_11_01_ + 0b_101101 - 0_b10_1101 + 0b; 0b101101l + 0b10_11_01l + 0b10_11_01_l + 0b_101101l - 0_b10_1101l + 0bl; 0xABCD + 0xAB_CD + 0xAB_CD_ + 0x_AB_CD - 0_xAB_CD - 0x; 0xABCDl + 0xAB_CDl + 0xAB_CD_l + 0x_AB_CDl - 0_xAB_CDl; 07 + 0_ + 0_7 + 07_ + 079 + 079_ + 0_79_ - 0a - 0_a; 07l + 0_l + 0_7l + 07_l + 0792l + 079_2_l - 0al - 0_a_l; 0 + 0L; 12345 + 12_34_5 + 1_____5 + 12_34_5_ - _12_34_5 - 12a45; 12345l + 12345L + 12_34_5_L - _12_34_5L - 12a45L; 123_-_456;
Same (or better) performance in ST4115 compared to 4113.
The benchmark shows:
The text was updated successfully, but these errors were encountered:
I can't reproduce this on 4115 or 4116 under Linux. Does it still happen in 4116?
Sorry, something went wrong.
Yes, it's the same with 4116.
Recent investigation revealed the variables context to be the reason for the mensioned slowdown.
variables
If the following line is commented out said benchmark file runs through within 70ms.
https://github.com/deathaxe/sublime-packages/blob/053a2ced694490c6c7fa386177a2f0d5e484e56d/Java/Java.sublime-syntax#L166
Slow down seems to be caused by the commented out branches. As soon as one of them is commented in again, parsing time increases to said value.
variables: - match: (?={{id_first_char}}) branch_point: variables branch: - variable-other - variable-namespace # - variable-qualifier - method-call-identifier # - lambda-parameter
May be an implementation issue of the syntax definition. Trying to find a hopefully better alternative.
It's another branch-related performance problem. I've already got a fix that makes it faster than 4113.
Cool.
Fixed in build 4117.
BenjaminSchaaf
No branches or pull requests
Description
I noticed a significant performance drop with Java Rewrite with regards to highlighting numbers.
One of the benchmarking files used to track performance is a syntax_test_perf_numbers.java with 10k lines of following code snippet.
Steps to reproduce
Expected behavior
Same (or better) performance in ST4115 compared to 4113.
Actual behavior
The benchmark shows:
Environment
The text was updated successfully, but these errors were encountered: