One of the runs seems to have a call to LexerRuby::RubyLexer#initialize
that isn't in the others. Helps?
···
-----Original Message-----
From: Simon Strandgaard [mailto:neoneye@adslhome.dk]
Sent: Monday, 2 August 2004 3:26 PM
To: ruby-talk ML
Subject: help me interpret profiler output
Im randomly experiencing a big slowdown in my code.. but I fail see
where and what is causing this slowdown. Advices on how to move on are
appreciated.
Im writing a text editor which can do syntax colorering of Ruby code.
recomputing all 50 lines takes about 0.09 - 0.15 seconds.
However when inserting one letter.. so that only one line is recomputed,
then it takes between 0.03 - 0.43 seconds! Im interested in hunting
down
why it often spends so long time computing just a single line.
I have
1) profiled the recomputing of all 50 lines and
2) profiled the recomputing of a single line when speed is bad and
3) profiled the recomputing of a single line when speed is good.
when I compare the profiler output, I fail to see where the slowdown
are.
not really.. the profiler output on that page are partial.. I left out the
bottom lines.
David Ross gave me a clue, to track keep track of time.. the recomputation of
one dirty line takes only to take 0.0027 seconds.. however at some point
afterwards something is eating time.. so it in total spends 0.15 seconds.
Hmm...
Eliminating console output doesn't change the situation (I have tried that).
Thanks Assaph for your suggestion.
···
On Monday 02 August 2004 08:22, Mehr, Assaph (Assaph) wrote:
One of the runs seems to have a call to LexerRuby::RubyLexer#initialize
that isn't in the others. Helps?