Opened 11 years ago

Closed 11 years ago

#1169 closed defect (fixed)

Busy loop triggered by mouse moving over map (Linux FP)

Reported by: ben.laenen@… Owned by: richard@…
Priority: major Milestone:
Component: potlatch (flash editor) Version:
Keywords: Cc:

Description

This has actually been in Potlatch for a long time (for several months at least) but it never got fixed so far.

The problem is that I often see Potlatch consuming around 30-50% of my CPU while doing nothing. It's triggered by just moving the mouse over the map. If your CPU is idle, just move your mouse and see the CPU usage go up. After that it stays at a constant level until you stop it, which can be done by clicking on a random place in the gray area at the bottom.

I'm using Flash 9 on Linux.

Change History (7)

comment:1 Changed 11 years ago by Richard

Summary: Busy loop triggered by mouse moving over mapBusy loop triggered by mouse moving over map (Linux FP)

Potlatch does have rollover/rollout events for the main map area - mapRollOver and mapRollOut in potlatch.as - so one would expect the CPU load to be slightly higher when moving the mouse over the map.

However, it shouldn't be 30%-50%, and certainly isn't on OS X. Do you get the same result with custom pointers turned off (in the options dialogue)?

comment:2 in reply to:  1 Changed 11 years ago by ben.laenen@…

Replying to Richard:

Potlatch does have rollover/rollout events for the main map area - mapRollOver and mapRollOut in potlatch.as - so one would expect the CPU load to be slightly higher when moving the mouse over the map.

The problem is that it's using the CPU that much when the mouse isn't anywhere near the browser window. Moving it over the window just triggers it. After it's triggered it stays like that.

However, it shouldn't be 30%-50%, and certainly isn't on OS X. Do you get the same result with custom pointers turned off (in the options dialogue)?

I always have custom pointers turned off.

The way to reproduce would be fairly easy if you have the bug on OS X:

Note that my computer isn't the newest one (2.8GHz IIRC), so it may be much less visible on yours.

comment:3 Changed 11 years ago by Richard

Not a problem on OS X - the CPU load is only high when you're in the area (the map movieclip). On moving the mouse elsewhere, the load drops again. So it does look like a Linux FP problem (wouldn't be the first time!).

I'll look into deleting the onMouseMove events rather than assigning them to an empty function (or null) - though the Ming compiler sometimes has problems with delete - which is the only thing I can think of off the top of my head. Would be nice to have some Potlatch developers who use Linux and can test these things. :)

comment:4 Changed 11 years ago by ben.laenen@…

I've tried reinstalling Flash and now it has slightly changed behaviour apparently (though I need to properly map some things to be sure first). If I now move the mouse pointer away from the flash applet CPU goes idle again.

However, if the mouse pointer is just sitting on the map doing nothing, the CPU constantly uses around 40%. Which still shouldn't happen IMHO.

I guess that I now have the same behaviour you have in OS X?

comment:5 Changed 11 years ago by Richard

"Which still shouldn't happen IMHO."

I agree, but are you volunteering to help fix it? :)

comment:6 Changed 11 years ago by Richard

I'm experimenting with taking the frame rate of the SWF down from 50 to 12. At present it seems to significantly reduce the CPU usage but I've not yet ascertained whether there are any downsides. If it works it'll be in 0.10c.

comment:7 Changed 11 years ago by Richard

Resolution: fixed
Status: newclosed

Frame rate set to 12 in 0.10c, seems to make an improvement. When 0.10c is live, if you're still having a problem, do reopen this ticket.

Note: See TracTickets for help on using tickets.