A former community discussing the business of software, from the smallest shareware operation to Microsoft. A part of Joel on Software.
We're closed, folks!
Doug Nebeker ("Doug")
I'm in the process of making a new version of a software, and for last 10 or so days I have been brooding over how to optimize a drawing routine. The cpu goes to 12% all the time and i did not like it. I tried caching some images, looking for faster basic drawing routines (lineto, polyline, etc...), and such usual suspects. All of this either led to to much complication or did not give any improvement.
Than this morning I thought to myself "if only i could drop that CPU by 50 % I'd be happy..."
And there was my answer the moment I thought the question...The whole drawing routine takes place in a timer event that fires every 20ms...well just changing the interval to 40ms I had halved the CPU hit without affecting visual impression...
All because I asked a more specific question "how to get 50% improvement' instead of 'how to get an improvement'...
Well...I thoughht it would be nice to share this with you and help this forum a little who seems to be on its hind legs as of lately
"I thought it in my language of course not in English..."
aah, thank you for clarifying that up, now it all makes sense, of course, english is far too inflexible to be finking such fings.
but on the serious note, yes, asking the RIGHT question will lead to RIGHT solutions, and vice versa.
(and yes, i did think it in english)
Monday, June 17, 2013
Thursday, June 20, 2013
This topic is archived. No further replies will be accepted.Other recent topics
Powered by FogBugz