Jump to content


Classic BoE editor CPU churning when editing terrain


  • Please log in to reply
8 replies to this topic
Prince of Kitties Prince of Kitties

Shadowwalker

  • Member
    • Member ID: 5,148
  • 535 posts

Posted 23 December 2012 - 07:10 AM #1 Classic BoE editor CPU churning when editing terrain

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?

Harehunter Harehunter

Cartographer

  • Member
    • Member ID: 6,587
  • 1,575 posts
  • LocationThe Lone Star State

Posted 23 December 2012 - 09:28 AM #2 Classic BoE editor CPU churning when editing terrain

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.
Lepus Temperamentalis non-gratus
I don't suffer from insanity. I enjoy every minute of it
Visit Harehunter's Haven. Hint books for Exile 1-3 are now online.
Check out my BoE Scenario Editor and Graphics Library.

Prince of Kitties Prince of Kitties

Shadowwalker

  • Member
    • Member ID: 5,148
  • 535 posts

Posted 23 December 2012 - 09:53 AM #3 Classic BoE editor CPU churning when editing terrain

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.

Harehunter Harehunter

Cartographer

  • Member
    • Member ID: 6,587
  • 1,575 posts
  • LocationThe Lone Star State

Posted 23 December 2012 - 10:38 AM #4 Classic BoE editor CPU churning when editing terrain

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.
Lepus Temperamentalis non-gratus
I don't suffer from insanity. I enjoy every minute of it
Visit Harehunter's Haven. Hint books for Exile 1-3 are now online.
Check out my BoE Scenario Editor and Graphics Library.

sylae sylae

Wisebottom

  • Global Moderator
    • Member ID: 5,482
  • 3,321 posts
  • LocationToledo, Ohio, United States

Posted 23 December 2012 - 11:07 AM #5 Classic BoE editor CPU churning when editing terrain

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 صيلي, 23 December 2012 - 11:11 AM.
could not replicate massive processor usage, r169 win7x64


Niemand Niemand

Hand of Avadon

  • Moderator
    • Member ID: 3,580
  • 2,138 posts
  • LocationWisconsin

Posted 23 December 2012 - 07:16 PM #6 Classic BoE editor CPU churning when editing terrain

Quote

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.)
Possibly you suppose that [he] is a harmless fellow, who with vacant mind recites some empty formula,
traces a wandering sign in the air, and with palsied hand shakes a wand the while he gibbers his insanity at the yawning moon.

The Mystic The Mystic

Eye of Avadon

  • Member
    • Member ID: 4,707
  • 3,242 posts
  • Locationon the run from the pun police

Posted 31 December 2012 - 04:22 PM #7 Classic BoE editor CPU churning when editing terrain

View PostHarehunter, on 23 December 2012 - 10:38 AM, said:

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.
Either I'm crazy, or everybody else is nuts.  And I know I'm not crazy because the little man who lives on my shoulder told me so.

Alcohol and calculus don't mix.  Friends don't let friends drink and derive.

Like all internet petitions, it will do nothing. - Dantius

Tevildo Tevildo

Watcher

  • Member
    • Member ID: 12,857
  • 192 posts
  • LocationBoston, MA, United States

Posted 13 March 2015 - 02:33 PM #8 Classic BoE editor CPU churning when editing terrain

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.

Celtic Minstrel Celtic Minstrel

Eye of Avadon

  • Global Moderator
    • Member ID: 5,296
  • 3,868 posts

Posted 13 March 2015 - 05:24 PM #9 Classic BoE editor CPU churning when editing terrain

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.
Exile 2 Book of Items (I didn't create it, I just converted it to HTML.)

"Man, I know how you feel. I once spent an hour playing WordPad before realising that it was a text editor." – Thuryl

"Dikiyoba just hopes no one ever blows up Saturn. Getting those rings back into their proper position would take hours."

"—Alorael, who spells phoenetically. No matter how much his orthography is a wreck, intelligibility rises from the ashes."

"I've never played a Spiderweb game. I didn't even know SW made games until I saw this thread." —Nikki




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users