From: SourceForge.net <no...@so...> - 2008-08-19 15:30:31
|
Patches item #1999448, was opened at 2008-06-21 23:08 Message generated for change (Comment added) made by k_satoda You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=300588&aid=1999448&group_id=588 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Kazutoshi Satoda (k_satoda) Assigned to: Matthieu Casanova (kpouer) Summary: More efficient and general fix for black hole bug Initial Comment: I found joining lines is very slow only when folding mode is set to other than 'none'. Reproduction recipe: (WARNING: This will cause vary long hang up.) - Open doc/CHANGES.txt in jEdit source tree. - Do [Expand All Folds] (C+e x). (without this, another bug happens.) - Do [Select All] (C+a). - Try [Join Lines] (C+j). This patch will speed up this situation by minimizing calls to buffer.getFoldLevel(). Also, this patch will expand the care about black hole bug to support ... - multi line edit including folded line - more folding modes other than 'explicit' - modification at the middle of folded range. I want approval from Matthieu who made the current fixes for the bugs. ---------------------------------------------------------------------- >Comment By: Kazutoshi Satoda (k_satoda) Date: 2008-08-20 00:30 Message: Logged In: YES user_id=1483238 Originator: YES Ping. Let me know if someone mind if I apply this patch and submit the problem in Matthieu's first comment as a new bug instead. I'll do so in a few days and start soaking in trunk for the next release, if no one objects. ---------------------------------------------------------------------- Comment By: Kazutoshi Satoda (k_satoda) Date: 2008-08-13 04:54 Message: Logged In: YES user_id=1483238 Originator: YES OK. Removed the applied patch. ---------------------------------------------------------------------- Comment By: Alan Ezust (ezust) Date: 2008-08-12 05:54 Message: Logged In: YES user_id=935841 Originator: NO if optimized join_line.patch was applied to trunk, could the person who applied it please remove the attachment from this tracker item? It fails to apply now, in any case. ---------------------------------------------------------------------- Comment By: Kazutoshi Satoda (k_satoda) Date: 2008-08-03 04:29 Message: Logged In: YES user_id=1483238 Originator: YES That's a greate idea. Applied in r13153. The speed problem has gone. Thanks. However, this patch still has many fixes about black hole bugs. I still think this should be applied. What is your evaluation? ---------------------------------------------------------------------- Comment By: Matthieu Casanova (kpouer) Date: 2008-08-01 06:59 Message: Logged In: YES user_id=285591 Originator: NO Hi, I analyzed what was slow in the joinline method and found this : When removing a line from the buffer, the LineManager.setFirstInvalidFoldLevel() method is called for the following lines. And when asking if the line is the foldStart, the foldLevels must be calculated if they are invalid. When joining lines, we will start from first line of the selection and join with the next line until the selection is 1 line length. And each time the line is invalidated and will require to recalculate fold levels.. So I inverted the method to join lines from last to first, doing this, we don't need to recalculate fold levels everytime. It seems far faster now, I attached a patch, please try it and tell me what you think File Added: optimized_join_line.patch ---------------------------------------------------------------------- Comment By: Kazutoshi Satoda (k_satoda) Date: 2008-07-05 22:08 Message: Logged In: YES user_id=1483238 Originator: YES Thank you for trying the patch. Yes, it is a problem. But I think it is a small problem which I can recover by folding it again after editing the line, and the black hole bugs is big problem which I can't recover it without reloading. I think it is fair to trade them. How do you think? Expanding with actual change of fold level should implemented for all fold handlers, not for only 'explicit'. ... by adding a method boolean mayChangeFoldLevel(<information of modification>) to the FoldHandler which returns true by default ... ? ---------------------------------------------------------------------- Comment By: Matthieu Casanova (kpouer) Date: 2008-06-25 17:08 Message: Logged In: YES user_id=285591 Originator: NO Hi, I just tested the patch but there is a problem : if I use explicit fold, with this buffer {{{ hello something }}} all folds are folded. I remove one "l" from hello. I think it should not expand folds since the fold level is not changed ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=300588&aid=1999448&group_id=588 |