Bug 220589 - code folding in large svg file not possible for the whole document
Summary: code folding in large svg file not possible for the whole document
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: folding (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-12-29 21:38 UTC by Florian Staudacher
Modified: 2011-08-08 07:37 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Staudacher 2009-12-29 21:38:50 UTC
Version:           3.3.2 (using KDE 4.3.2)
OS:                Linux
Installed from:    Ubuntu Packages

I have an SVG file > 13MB I want to edit with kate. Since it's such a huge file I'd like to fold the parts of the XML I don't need. 
The problem I am experiencing is, that this is only possible until line 18.495 of my document. Anything below that can't be folded (there are no arrow-handles on the margin). Up to that line I already have about 100 or more folded sections on the same indentation level. It seems to me, that there is a limited amount of folds for one indentation level (and not having looked at the code I'd say that's due to a recursive call of a method and the call stack not liking it).

If you need anything more, please tell me. I won't be able to make the SVG publicly available (due to copyright issues), but I should be able to email it to somebody who needs it to take a look at the problem and promises not to pass it on.
Comment 1 Adrian 2011-07-27 13:36:20 UTC
Florian, please test the file now (Kate has a new code folding). If it's still not working, then email me the file.
Comment 2 Florian Staudacher 2011-08-06 16:32:04 UTC
That sounds great! Is it in 4.7 already or would I need to compile from source? (I am using Arch Linux now, in case that is important somehow.)
Comment 3 Dominik Haumann 2011-08-07 08:51:35 UTC
It's will not be in 4.7, no backport possible. But you can very easily try it yourslef: http://kate-editor.org/get-it/
Comment 4 Florian Staudacher 2011-08-07 15:49:59 UTC
Ok, so I got kate from git and from my first try I can report that the whole file up to the very last line seems to have code folding capability. (I only scrolled from top to bottom rather quickly, though, so natually I didn't see every single line.)

It even works relatively fast, considering the filesize and the amount of foldable code segments. By that I mean that if I skip from the top of the file to somewhere in the middle randomly, there is no noticeable delay or ui freezes.
When I scroll really hard in the file, the CPU usage by kate goes up to 26% (Athlon 3GHz dual core), and top reports the following memory usage: VIRT 554m, RES 193m, SHR 30m - if that has any use for you.

For me the problem seems fixed. Great work!
Comment 5 Dominik Haumann 2011-08-08 07:37:22 UTC
Thanks for your feedback, Florian. Then I close it as fixed :-)