Jump to content
Sign in to follow this  
Prince of Kitties

Classic BoE editor CPU churning when editing terrain

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?

Share this post


Link to post
Share on other sites

I just fired up both the classic version as well as my own, on Windows 7, with no performance problems at all. Since both Wine and Virtualbox run as applications on your machine, whatever is affecting the BoE editor is dependent on how the VM interacts with your host OS.

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

I don't know about Win2K, but XP has never caused me trouble either. If I recall correctly, BoE was written in the day of Windows 95/98.

 

I would check the compatibility of the dll's or the comdlg32.ocx, with emphasis on the comdlg32.ocx.

Share this post


Link to post
Share on other sites
sylae   

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

Share this post


Link to post
Share on other sites
Niemand   
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.)

Share this post


Link to post
Share on other sites
I don't know about Win2K, but XP has never caused me trouble either. If I recall correctly, BoE was written in the day of Windows 95/98.
You're close; BoE was written for Win3.1/95.

 

I've run CBoE in Wine with no CPU churning, just a 30-second lag after each click.

Share this post


Link to post
Share on other sites

Found the problem! Finally!

 

Additional Features menu -> uncheck "Terrain Animations Play" -> no more CPU churn.

 

I would suggest this feature be turned off by default, but I'd bet it doesn't cause nearly as much resource usage in the cross-platform port.

Share this post


Link to post
Share on other sites

I don't recall any serious lag from animations in the cross-platform port, but it's possible I just so happened to never open a dialog with animateable graphics... it's not a problem on my Mac, at least.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×