Jump to content

Classic BoE editor CPU churning when editing terrain


Prince of Kitties

Recommended Posts

A while ago I noticed that the CBoE scenario editor causes continuous ~80% CPU usage when editing terrain. I figured this was a problem with Wine.

 

More recently I got to test CBoE in Windows 2000, under Virtualbox. Unfortunately, the same problem exists there, so it is probably not a Wine issue.

 

Has anyone else noticed this? Any ideas what Windows tools I could use to spot the CPU hogging function?

Link to comment
Share on other sites

Hmm. Another possibility that comes to mind is that this is a bug that only occurs on older Windows NT versions, like 2000 and XP. Your idea sounds more likely though...

 

I should note, though, that the CPU churning does not occur (in Wine at least) if I use the original BoE editor.

Link to comment
Share on other sites

Hmmm. Would it be possible to compile a version with debug headers and maybe profile where the lag is coming from, or something? That's something debuggers can do right?

 

Honestly, I would suspect that it's some sort of Jeffers-induced infinite mouse-checking loop or something. And you know that's something he would do. And perhaps the virtualization menthods that wine and VB both use are causing drama. Try dinking with any processor-related settings and seeing what happens, although since Wine is doing it too, i suspect that will do nothing, since Wine is less a virtualization and more of a port of windows stuff.

Edited by صيلي
could not replicate massive processor usage, r169 win7x64
Link to comment
Share on other sites

Hmmm. Would it be possible to compile a version with debug headers and maybe profile where the lag is coming from, or something? That's something debuggers can do right?

You don't necessarily have to have a debug build, but you probably need debug symbols to be able to tell which function is which.

 

A debugger usually isn't helpful for answering this type of question, you usually need a dedicated profiler. On Mac OS I use Instruments (Shark was way better but no longer functions reliably thanks to neglect; good job Apple), and callgrind is an option on most unixy platforms. I have no idea what there is that work well for Windows, perhaps pages like this one are of some use. According to some random webpage I just read, running callgrind on Wine running a program may actually work and accomplish something, but don't count on it.

 

The BoA editor definitely had out-of-control CPU use problems at one time, due to polling for events with an infinitesimal timeout. I fixed this in a really dumb way: most of the time it uses a large timeout 60 ms or some such, and switches back to the minimum timeout only while the mouse is being dragged. (Drag the mouse and keep holding to watch your CPU use go through the roof just like the bad old days.)

Link to comment
Share on other sites

  • 2 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...