-
Notifications
You must be signed in to change notification settings - Fork 441
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
I'm using Stackprof for a performance check of Rails documents generation. I checked methods below: - RDoc::Parser::RipperStateLex#get_squashed_tk - RDoc::Parser::RipperStateLex#initialize - RDoc::Parser::RipperStateLex::InnerStateLex#on_default Before this commit, these use processing time about 19.6%. aycabta@x270:~/rdoc$ stackprof stackprof-rails-before.dump --limit 1 ================================== Mode: cpu(1000) Samples: 66894 (0.83% miss rate) GC: 15700 (23.47%) ================================== TOTAL (pct) SAMPLES (pct) FRAME 15700 (23.5%) 15700 (23.5%) (garbage collection) aycabta@x270:~/rdoc$ stackprof stackprof-rails-before.dump | \ grep 'RipperStateLex' 1727 (2.6%) 1472 (2.2%) (snip)RipperStateLex#get_squashed_tk 9352 (14.0%) 1281 (1.9%) (snip)RipperStateLex#initialize 2018 (3.0%) 475 (0.7%) (snip)RipperStateLex::InnerStateLex#on_default After this commit, processing time is reduced to 15.0%. aycabta@x270:~/rdoc$ stackprof stackprof-rails-after.dump --limit 1 ================================== Mode: cpu(1000) Samples: 61020 (1.01% miss rate) GC: 13824 (22.65%) ================================== TOTAL (pct) SAMPLES (pct) FRAME 13824 (22.7%) 13824 (22.7%) (garbage collection) aycabta@x270:~/rdoc$ stackprof stackprof-rails-after.dump --limit 0 | \ grep '#get_squashed_tk\|RipperStateLex#initialize\|#on_default' 735 (1.2%) 533 (0.9%) (snip)RipperStateLex::InnerStateLex#on_default 760 (1.2%) 517 (0.8%) (snip)RipperStateLex#get_squashed_tk 7663 (12.6%) 1 (0.0%) (snip)RipperStateLex#initialize
- Loading branch information
Showing
1 changed file
with
39 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters