You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
as this linter can be used by IDEs and it is called repeatingly, the startup-overhead should be minimized. benchmarking the whole program vs the next deeper routine:
############# lint_path(demo.md) - Linux, 147 checks
parallel took 71.520 ms -> run0
parallel took 78.004 ms -> run1
parallel took 80.381 ms -> run2
parallel-cached took 1.847 ms -> run0
parallel-cached took 1.336 ms -> run1
parallel-cached took 1.252 ms -> run2
############# proselint(demo.md) - parallel, Linux, 147 checks
parallel took 166.188 ms
parallel-cached took 64.538 ms
Comparing the <2ms vs. 64 ms from the cached runs shows it best. Profiling reveals that some of it is caused by click. As the project does not need much cli-magic it would be best to use basic builtins instead of click. Performance should also improve when regex-str of "static" checks are precompiled into patters and memoized.
The text was updated successfully, but these errors were encountered:
orgua
changed the title
[feature] faster startup
[feature-proposal] faster startup
Jan 23, 2024
click is faster than using argparse, it would seem. getopt has much lower figures, close to that of the baseline (average 0.00005 s in my testing), but its implementation details are not very well suited for our purposes. a custom implementation provides a healthy medium, so CLI overhead is now nearly eliminated in the refactor.
as this linter can be used by IDEs and it is called repeatingly, the startup-overhead should be minimized. benchmarking the whole program vs the next deeper routine:
Comparing the <2ms vs. 64 ms from the cached runs shows it best. Profiling reveals that some of it is caused by click. As the project does not need much cli-magic it would be best to use basic builtins instead of click. Performance should also improve when regex-str of "static" checks are precompiled into patters and memoized.
The text was updated successfully, but these errors were encountered: