I want to know what is optimal size of bufferSize in following code
class myView : public QScintilla {
void myView::readFile(QString ofilename) {
if (FILE* fp = fopen(ofilename.toLatin1().constData() "r")) {
QTextStream ts(fp, QIODevice::ReadOnly);
int bufferSize = 8192;
do {
QString s = ts.read(bufferSize);
append(s);
} while(!ts.atEnd());
setModified(FALSE);
UFile::close(fp);
d_filename = ofilename;
emit fileNameChanged(ofilename);
}
}
}
so that we do not see any run time issues
On Wed, Jun 8, 2016 at 9:31 AM, Roshni Lalwani <[email protected]> wrote:
> Hi
> I have an object Q Scintilla . I want to know what is optimal size
> of bufferSize in following code
>
> if (FILE* fp = fopen(ofilename.toLatin1().constData() "r")) {
> QTextStream ts(fp, QIODevice::ReadOnly);
> int bufferSize = 8192;
> do {
> QString s = ts.read(bufferSize);
> append(s);
> } while(!ts.atEnd());
> setModified(FALSE);
> UFile::close(fp);
> d_filename = ofilename;
> emit fileNameChanged(ofilename);
> }
>
> so that we do not see any performance issues
>
>
_______________________________________________
QScintilla mailing list
[email protected]
https://www.riverbankcomputing.com/mailman/listinfo/qscintilla