matkuki / qscintilla_docs

Documentation for QScintilla editing component of the PyQt framework
http://qscintilla.com/
GNU General Public License v3.0
59 stars 17 forks source link

if No define QT_NO_ACCESSIBILITY , Switching line formats is too slow #14

Closed cxasm closed 2 years ago

cxasm commented 3 years ago

what is the QT_NO_ACCESSIBILITY ,What is its function ?

I found a problem,is a bug . when i change a end-of-line of doc from windows to linux format,too slow !

I am in qt5.12 。The doc size is 480k, it took at least three minutes。I debug found if define this QT_NO_ACCESSIBILITY, The speed picked up immediately。

void QsciScintillaQt::NotifyParent(SCNotification scn) --- the code which define with QT_NO_ACCESSIBILITY,tow slow .

Can author give some advice?

matkuki commented 3 years ago

QT_NO_ACCESSIBILITY seems to be a Qt preprocessor define, not something to do with QScintilla. But I have no idea what it does, sorry. The only reference I could find is in an old Qt4 header file: https://dreamswork.github.io/qt4/qconfig-minimal_8h.html

As for the the Linux end-of-line characters, I have used it multiple times without any problems with performance.

The doc size is 480k, it took at least three minutes ...

What took three minutes? Showing the text in a QSciScintilla widget? I cannot say what the problem is without seeing your code on how you load the text from a file into a QSciScintilla widget.

cxasm commented 2 years ago

I mean the CPU is stuck for 3 minutes. Define QT_NO_ACCESSIBILITY to avoid this.