D17241: Disable highlighting for lines longer than 1024 characters.

2018-12-04 Thread Kåre Särs
sars added a comment.


  I agree, we need to do something about the line length limit (that only wraps 
the lines at the limit when opening the file).
  
  The question is: do we totally remove the option and limit or only the option 
and raise the limit.
  
  You can still edit the document at 200 000 characters, but it starts to get 
sluggish. At 500 000 it takes almost a second to insert a space (on my 
computer). If we keep the limit, we probably could be one of the few editor 
that could open and read files with millions of characters on a line.
  
  If we keep the limit what would it be? 10, 65536, 5 or what?
  
  Or do we keep the option and just raise the default limit?
  
  I'm currently working on adding a notice message about the disabled 
highlighting.
  
  There also seems to be a test for the long lines that needs to be updated.

REPOSITORY
  R39 KTextEditor

REVISION DETAIL
  https://phabricator.kde.org/D17241

To: sars, cullmann, vkrause, dhaumann, mwolff
Cc: mwolff, brauch, kwrite-devel, kde-frameworks-devel, hase, michaelh, 
ngraham, bruns, demsking, cullmann, sars, dhaumann


D17241: Disable highlighting for lines longer than 1024 characters.

2018-12-04 Thread Milian Wolff
mwolff requested changes to this revision.
mwolff added a comment.
This revision now requires changes to proceed.


  what sven said, we should also remove the code to disable highlighting 
altogether when the line limit is reached, no?

INLINE COMMENTS

> katerenderer.cpp:387
>  
> +if (textLine->length() > 1024 && !selectionsOnly) {
> +return newHighlight;

put the 1024 into a constant and use it here and below such that we ensure the 
number stays in sync

also, don't we have a setting for the line length limit? shouldn't that be used 
instead here?

> katerenderer.cpp:400
> +const QVector  = 
> textLine->attributesList();
> +for (int i = 0; i < al.count(); ++i) {
> +if (al[i].length > 0 && al[i].attributeValue > 0) {

this style-change should be submitted independently of this code review

REPOSITORY
  R39 KTextEditor

REVISION DETAIL
  https://phabricator.kde.org/D17241

To: sars, cullmann, vkrause, dhaumann, mwolff
Cc: mwolff, brauch, kwrite-devel, kde-frameworks-devel, hase, michaelh, 
ngraham, bruns, demsking, cullmann, sars, dhaumann


D17241: Disable highlighting for lines longer than 1024 characters.

2018-12-01 Thread Kåre Särs
sars updated this revision to Diff 46633.
sars retitled this revision from "WIP: Disable highlighting for lines longer 
than 1024 characters." to "Disable highlighting for lines longer than 1024 
characters.".
sars edited the summary of this revision.
sars added a reviewer: dhaumann.
sars added a comment.


  (Remove the unrelated change in src/view/kateview.cpp)
  
  This version now disables the highlighting for lines longer than 1024 
characters also when the line is selected. The selection highlight is shown tho.
  
  What is the way forward? Do we apply this? Should we modify the line length 
limit?
  
  I have now tested with a file with 97000 columns and I can start to see some 
slowdown but it is still usable.
  
  I think we could raise the limit to 5, but also add a notification if the 
file contains lines longer than 1024.

REPOSITORY
  R39 KTextEditor

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D17241?vs=46632=46633

REVISION DETAIL
  https://phabricator.kde.org/D17241

AFFECTED FILES
  src/render/katerenderer.cpp

To: sars, cullmann, vkrause, dhaumann
Cc: brauch, kwrite-devel, kde-frameworks-devel, hase, michaelh, ngraham, bruns, 
demsking, cullmann, sars, dhaumann


D17241: Disable highlighting for lines longer than 1024 characters.

2018-11-29 Thread Sven Brauch
brauch added a comment.


  Shouldn't this change simultaneously remove the line length limit ...?

REPOSITORY
  R39 KTextEditor

REVISION DETAIL
  https://phabricator.kde.org/D17241

To: sars, cullmann, vkrause
Cc: brauch, kwrite-devel, kde-frameworks-devel, hase, michaelh, ngraham, bruns, 
demsking, cullmann, sars, dhaumann


D17241: Disable highlighting for lines longer than 1024 characters.

2018-11-29 Thread Shubham
shubham added reviewers: cullmann, vkrause.

REPOSITORY
  R39 KTextEditor

REVISION DETAIL
  https://phabricator.kde.org/D17241

To: sars, cullmann, vkrause
Cc: kwrite-devel, kde-frameworks-devel, hase, michaelh, ngraham, bruns, 
demsking, cullmann, sars, dhaumann


D17241: Disable highlighting for lines longer than 1024 characters.

2018-11-29 Thread Kåre Särs
sars created this revision.
Herald added projects: Kate, Frameworks.
Herald added subscribers: kde-frameworks-devel, kwrite-devel.
sars requested review of this revision.

REPOSITORY
  R39 KTextEditor

BRANCH
  master

REVISION DETAIL
  https://phabricator.kde.org/D17241

AFFECTED FILES
  src/render/katerenderer.cpp

To: sars
Cc: kwrite-devel, kde-frameworks-devel, hase, michaelh, ngraham, bruns, 
demsking, cullmann, sars, dhaumann