[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kwrite-devel
Subject:    Re: Review Request 113476: Make word completion work with abbreviations
From:       "Sven Brauch" <svenbrauch () googlemail ! com>
Date:       2013-10-28 15:11:10
Message-ID: 20131028151110.3486.11050 () vidsolbach ! de
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/113476/
-----------------------------------------------------------

(Updated Oct. 28, 2013, 3:11 p.m.)


Status
------

This change has been marked as submitted.


Review request for Kate and Milian Wolff.


Repository: kate


Description
-------

As discussed, this patch attempts to make text completion work with the recently \
introduced abbreviation expansion.

The changes are in fact quite simple; the only thing which really changes is that \
previously the word completion model would only search for words which match the \
already-entered text, while the new implementation always gathers all words, and \
leaves filtering to the main completion model itself (thus allowing it to do its \
abbreviation thing).

Getting the words themselves is quite fast, as can be seen in the benchmarks; parsing \
an 8.5 MB file with 500k distinct words takes about half a second -- 8.5 MB being \
several orders of magnitude above of what you usually edit with kate. I investigated \
a more clever approach to retrieving the words, avoiding to copy the string data \
unless the word actually needs to be stored, but it didn't give better performance \
than the naive QSet approach.

The actual display and filtering of the list is more problematic, and takes a \
noticeable time for more than approx. 50k items, at least for the first letter. If \
possible, I want to improve this in future patches. Still, 50k items is far more than \
what you usually have in program code or written text.


Diffs
-----

  ktexteditor/codecompletionmodel.h cb67125c7463f0498f58ab0d096c7855d4fa688a 
  part/completion/katecompletionmodel.cpp 89dc8d2808515969fcbec917bb4956e8afc67eac 
  part/completion/katewordcompletion.h bba75d1bfacc7d054b16c3182ed68a25e0e62b57 
  part/completion/katewordcompletion.cpp d158411bebd67c290166c0f8aed5aaaa97a77611 
  tests/CMakeLists.txt c6f054534d4370b1cc2908d99554565563ce2c63 
  tests/wordcompletiontest.h PRE-CREATION 
  tests/wordcompletiontest.cpp PRE-CREATION 

Diff: http://git.reviewboard.kde.org/r/113476/diff/


Testing
-------


Thanks,

Sven Brauch


[Attachment #5 (text/html)]

<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/113476/">http://git.reviewboard.kde.org/r/113476/</a>
  </td>
    </tr>
   </table>
   <br />



<table bgcolor="#e0e0e0" width="100%" cellpadding="8" style="border: 1px gray \
solid;">  <tr>
  <td>
   <h1 style="margin-right: 0.2em; padding: 0; font-size: 10pt;">This change has been \
marked as submitted.</h1>  </td>
 </tr>
</table>
<br />


<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" \
style="background-image: \
url('http://git.reviewboard.kde.org/static/rb/images/review_request_box_top_bg.ab6f3b1072c9.png'); \
background-position: left top; background-repeat: repeat-x; border: 1px black \
solid;">  <tr>
  <td>

<div>Review request for Kate and Milian Wolff.</div>
<div>By Sven Brauch.</div>


<p style="color: grey;"><i>Updated Oct. 28, 2013, 3:11 p.m.</i></p>









<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
kate
</div>


<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;">As discussed, this patch attempts to make text completion work with the \
recently introduced abbreviation expansion.

The changes are in fact quite simple; the only thing which really changes is that \
previously the word completion model would only search for words which match the \
already-entered text, while the new implementation always gathers all words, and \
leaves filtering to the main completion model itself (thus allowing it to do its \
abbreviation thing).

Getting the words themselves is quite fast, as can be seen in the benchmarks; parsing \
an 8.5 MB file with 500k distinct words takes about half a second -- 8.5 MB being \
several orders of magnitude above of what you usually edit with kate. I investigated \
a more clever approach to retrieving the words, avoiding to copy the string data \
unless the word actually needs to be stored, but it didn&#39;t give better \
performance than the naive QSet approach.

The actual display and filtering of the list is more problematic, and takes a \
noticeable time for more than approx. 50k items, at least for the first letter. If \
possible, I want to improve this in future patches. Still, 50k items is far more than \
what you usually have in program code or written text.</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>ktexteditor/codecompletionmodel.h <span style="color: \
grey">(cb67125c7463f0498f58ab0d096c7855d4fa688a)</span></li>

 <li>part/completion/katecompletionmodel.cpp <span style="color: \
grey">(89dc8d2808515969fcbec917bb4956e8afc67eac)</span></li>

 <li>part/completion/katewordcompletion.h <span style="color: \
grey">(bba75d1bfacc7d054b16c3182ed68a25e0e62b57)</span></li>

 <li>part/completion/katewordcompletion.cpp <span style="color: \
grey">(d158411bebd67c290166c0f8aed5aaaa97a77611)</span></li>

 <li>tests/CMakeLists.txt <span style="color: \
grey">(c6f054534d4370b1cc2908d99554565563ce2c63)</span></li>

 <li>tests/wordcompletiontest.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>tests/wordcompletiontest.cpp <span style="color: \
grey">(PRE-CREATION)</span></li>

</ul>

<p><a href="http://git.reviewboard.kde.org/r/113476/diff/" style="margin-left: \
3em;">View Diff</a></p>







  </td>
 </tr>
</table>




  </div>
 </body>
</html>



_______________________________________________
KWrite-Devel mailing list
KWrite-Devel@kde.org
https://mail.kde.org/mailman/listinfo/kwrite-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic