<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
<tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="http://git.reviewboard.kde.org/r/107140/">http://git.reviewboard.kde.org/r/107140/</a>
</td>
</tr>
</table>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<p style="margin-top: 0;">On November 1st, 2012, 1:59 p.m., <b>Milian Wolff</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">You do not instantiate a KateDocument, instead you ask the KTextEditor instance to create a document (of type KTextEditor::Document) for you. See e.g. our code completion tests in cpp for how to do that. Please do add a benchmark and share before/after numbers.
Furthermore, I dislike the 10ms timer. We might integrate it temporarily as a quick performance fix, but I would really like to see someone fixing the actual issues where they are created. This means at one hand KatePart shouldn't emit tons of such signals. Please write to kwrite-devel and ask there for their feedback.
I furthermore think that this whole 500ms delay in the background parser is wrongly placed. It should cover the cases where an open document gets changed all the time, i.e. the user is happily hacking away. Then we shouldn't trigger tons of parse jobs. But for all other use cases I can think of, namely adding project files to the background parser or also unit tests, we do not want the delay. So imo, we should rip out the delay from the background parser and add it to the place where we addDocument - according to your patch that would be the change tracker.
So, tl;dr; version: Write a benchmark and get the QSet patch into kdevplatform, then improve KatePart and/or refactor the background parser + change tracker.
Cheers</pre>
</blockquote>
</blockquote>
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">:) If you find places to avoid too much overhead, patches are welcome ;)</pre>
<br />
<p>- Christoph</p>
<br />
<p>On October 30th, 2012, 11:14 p.m., Sven Brauch wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('http://git.reviewboard.kde.org/media/rb/images/review_request_box_top_bg.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
<tr>
<td>
<div>Review request for KDevelop and Milian Wolff.</div>
<div>By Sven Brauch.</div>
<p style="color: grey;"><i>Updated Oct. 30, 2012, 11:14 p.m.</i></p>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"> Add a 10ms timer to scheduling a document for reparsing, and refactor.
This fixes extreme slowness when pasting large parts of text
into the editor.
Also, make DocumentParsePlan targets a set instead of a list.
I wanted to write a unit test benchmark which verifies this but it turns out to be difficult, since you need a KateTextDocument for inserting text, and it's not being installed (the .h file). I thus didn't do that yet.
You can easily test this manually by pasting > 3000 lines into the editor.</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>language/backgroundparser/backgroundparser.cpp <span style="color: grey">(28a4202)</span></li>
<li>language/backgroundparser/documentchangetracker.h <span style="color: grey">(e3f7f5c)</span></li>
<li>language/backgroundparser/documentchangetracker.cpp <span style="color: grey">(2aab705)</span></li>
</ul>
<p><a href="http://git.reviewboard.kde.org/r/107140/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>