Closed ghost closed 1 year ago
This feels like a brittle change. NSEP is not guaranteed to be 2 characters, and thus, any changes away from a Regex would require a more generalized string comparison.
Even though this might seem like the
::
separation is fairly baked into the Ruby language, YARD does allow for extensions to modify the source types being parsed (yard-js is one example), and this would break those plugins.It's a pretty minor change (suggestions already provided) but I'm wondering if this significantly affects the performance improvements?
Thanks for taking a look. I can re-test this week, but I just wanted to note that existing code seems to assume that NSEP is two characters:
Do these spots need to use NSEP.size
as well?
I will not have time to work on this branch in the short term
Description
Hi, I am trying to optimize YARD a bit to speed up documentation runs on a large codebase.
The codebase is private, so I am using https://github.com/watir/watir/ as a smaller stand-in to report benchmarking numbers from https://github.com/SamSaffron/memory_profiler.
Test set-up
rvm
on Linux)ruby-memory-profiler --no-color --retained-strings=500 --allocated-strings=500 --max=300 -o prof.log ./run-yard.rb stats
run-yard.rb
is a smaller version of/bin/yard
(MemoryProfiler was not able to run/bin/yard
)stats
command to avoid memory exhaustionPerformance data
Completed Tasks
bundle exec rake
locally (if code is attached to PR).