> I tried it with a 4 GB file, and I can confirm what you wrote.

Though that (4GB) might be close to the limit for this demo, as I coded the 
file size as "unsigned" rather than using "off_t" or something that might be 
more correct...

On a 32-bit system a 4GB file might well fall over in this test...


> However, when I reduced the interval of updates, i.e. changed
> the line
> 
>    if((curr - last) > 3.0)
> 
> to something like
> 
>    if((curr - last) > 0.001)
> 
> I could see that the program ran much slower. It's almost like
> having no "if...", i.e. updating the display after each read.

Yup, that's what I anticipated, that making too many Fl::check() calls slows it 
down, but doing a little extra work, to make sure you only update the display 
when there's something to see, that makes the refreshes almost "free".


> That's maybe more like the OP's problem... and it shows how to
> solve it, as we suggested.

I hope so!


SELEX Galileo Ltd
Registered Office: Sigma House, Christopher Martin Road, Basildon, Essex SS14 
3EL
A company registered in England & Wales.  Company no. 02426132
********************************************************************
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.
********************************************************************

_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to