The current implementation of the ruby code in func-menu.el in
edit-utils has a problem where the code will incorrectly
determine that the whole buffer is in fact a function name
repeatedly, causing a huge waiting time as can be seen by the
profiling data at the bottom. This seems to happen with
modules, since the code in func-menu assumes that all code
lives in a class, while it can also live in a module. The
attached patch fixes things for me and allows me to edit my
ruby code again without waiting up to 5 minutes for the
function menu to be updated all the time.
Function Name Ticks/Total %Usage Calls
GC-Usage/ Total
===========================================/===== ====== =====
========/=======
(in garbage collection) 15514/15559 46.698 777
-912929912/-912928056
fume-index-sublist-method-3-1 15400/15405 46.355 29728
886310660/886310660
fume-index-sublist-method-3 1527/32080 4.596 2
274704/-1553800
re-search-backward 209/ 229 0.629 48
9722516/9722516
fume-replace-str 179/ 179 0.539 160
8345132/8345132
(profile overhead) 98/ 98 0.295
fume-find-next-ruby-function-name 87/ 595 0.262 41
3134712/-2996580
(in redisplay) 49/ 67 0.147 297
1135952/1413012
fume-sort-by-name 25/ 25 0.075 150
40/ 40
format 21/ 21 0.063 266
1192952/1192952
load-internal 11/ 27 0.033 10
455160/ 796272
(in internal-external conversion) 10/ 10 0.030 1602
568792/ 568792
re-search-forward 9/ 10 0.027 167
235420/ 235420
|