Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QuadDraw revisited - drawing program work in progress
#17
(06-01-2022, 10:36 PM)Dav Wrote:
(06-01-2022, 07:22 PM)James D Jarvis Wrote: Just reading the code and wondering why you never free fontsheet&  , is that because you passed it to _Memimage ?

No, to increase speed when calling the SUB more than once.  I decided it better to make fontsheet& only once and just leave it open for the whole program run, so the image doesn't have to be decoded/created every time the SUB is called.  I plan to use this for things that need fast drawing.  In my testing this increased speed over 10x.  I could call the SUB 1500 times in one second this way, but only 135 times a second when freeing the image and having to make it over every time.   I usually don't like to leave images hanging open, but in this case thought it worth it for the speed gain.

- Dav

Is there something gained by doing this in the sub and keeping track of the memory location as opposed to doing it outside the sub but with a shared handle created before calling the sub?  (sorry about the questions, just getting into really paying attention to memory usage as a feature to speed execution as opposed to just being able to hold onto data and make use of it).
Reply


Messages In This Thread
RE: QuadDraw revisited - drawing program work in progress - by James D Jarvis - 06-02-2022, 12:16 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  My ascii Map Maker... in progress / lots of work to do. pmackay 5 669 08-24-2025, 08:17 PM
Last Post: Unseen Machine
  Digit II level editor in progress pmackay 0 333 07-19-2025, 04:03 AM
Last Post: pmackay
  Everything Date Library in progress SMcNeill 2 713 05-14-2025, 08:36 PM
Last Post: SMcNeill
  SaveImage Library 3.0 (in progress) SMcNeill 5 1,250 06-22-2024, 03:23 PM
Last Post: bplus
  RotoLine line drawing James D Jarvis 0 517 10-11-2023, 04:24 PM
Last Post: James D Jarvis

Forum Jump:


Users browsing this thread: 1 Guest(s)