On 8 Jun 2016, at 5:42 am, Roshni Lalwani <[email protected]> wrote:
> 
> 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 

There is no optimal size - the bigger the better. There will be a point where 
increasing the size makes no difference but what that is depends on the user's 
system.

Phil
_______________________________________________
QScintilla mailing list
[email protected]
https://www.riverbankcomputing.com/mailman/listinfo/qscintilla

Reply via email to