Bug 84067 - quanta: switching to a tab with a long perl script takes 2 seconds
Summary: quanta: switching to a tab with a long perl script takes 2 seconds
Status: RESOLVED FIXED
Alias: None
Product: quanta
Classification: Unmaintained
Component: general (show other bugs)
Version: unspecified
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: András Manţia
URL:
Keywords:
: 86675 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-06-27 03:03 UTC by Ben Burton
Modified: 2004-11-24 10:07 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ben Burton 2004-06-27 03:03:57 UTC
Version:            (using KDE KDE 3.2.3)
Installed from:    Debian testing/unstable Packages
OS:                Linux

Received through the Debian BTS (#248982).

I'm editing a 2500-line perl script in Quanta.  Every time I switch from a 
different tab onto the tab that holds this script, the display pauses for 
about 2 seconds before it's redrawn.

2 seconds may not seem like a long time, but it's distracting and a little bit 
annoying.  It's just slow.  (My CPU is a P4-2.4, and the delay in switching 
to other tabs is too short to be noticeable.)  And there are times when I'm 
trying to switch quickly back and forth between tabs, and I just can't do it.

I thought the delay might have to do with calculating the code folding 
markers, since I don't see the delay with HTML files, for example.  But 
turning off the code folding markers didn't solve the problem.

Any help would be appreciated.

(end of debian bug report)

I can reproduce this on my machine also -- I presume the delay is in working out the document structure?  If so, might it be possible to cache these calculations, so that it's only slow the first time you switch to the tab, and then subsequent switches are fast because it can just call up its pre-calculated results?

Thanks - Ben. :)
Comment 1 András Manţia 2004-07-26 23:21:27 UTC
The delay is caused by reparsing the document. Caching the parser result 
is not a real solution, so currently I'm clueless about how to do this 
properly. Anyway if the structure tree is not visible, the switching 
should be much faster.

Comment 2 András Manţia 2004-09-14 15:07:33 UTC
*** Bug 86675 has been marked as a duplicate of this bug. ***
Comment 3 Roland Seuhs 2004-09-14 21:30:38 UTC
I'm the submitter of #86675, I've tried it without the structure tree and it didn't get any faster.

BTW, why isn't caching the parser result a solution?
Comment 4 András Manţia 2004-09-14 21:37:36 UTC
No, as it would use just too much memory.

Comment 5 Roland Seuhs 2004-10-09 20:33:11 UTC
I don't know if it will help but I noticed that the delay is getting much larger at a specific filesize, it seems like up to a certain size the parser can process the file at once while it somehow becomes *very* slow on bigger files - possibly this is a bug in the parser?
Anyway, KDevelop doesn't suffer from this problem.
Comment 6 András Manţia 2004-11-24 10:07:52 UTC
Perl is currently not supported, but I've added a DTEP called "Empty" 
that can be used for files that are not supported. Set the DTEP for the 
perl document to this one and from now on switching to it should be 
much faster. Will be available in 3.4.