openstreetmap / trac-tickets

Archived Trac Tickets
1 stars 1 forks source link

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

Closed openstreetmap-trac closed 3 years ago

openstreetmap-trac commented 3 years ago

Reporter: ben.laenen[at]gmail.com [Submitted to the original trac issue database at 2.46pm, Tuesday, 16th September 2008]

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.

openstreetmap-trac commented 3 years ago

Author: Richard [Added to the original trac issue at 3.33pm, Tuesday, 16th September 2008]

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)?

openstreetmap-trac commented 3 years ago

Author: ben.laenen[at]gmail.com [Added to the original trac issue at 3.45pm, Tuesday, 16th September 2008]

Replying to [comment:1 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.

openstreetmap-trac commented 3 years ago

Author: Richard [Added to the original trac issue at 4.02pm, Tuesday, 16th September 2008]

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. :)

openstreetmap-trac commented 3 years ago

Author: ben.laenen[at]gmail.com [Added to the original trac issue at 4.14pm, Tuesday, 16th September 2008]

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?

openstreetmap-trac commented 3 years ago

Author: Richard [Added to the original trac issue at 8.07am, Thursday, 18th September 2008]

"Which still shouldn't happen IMHO."

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

openstreetmap-trac commented 3 years ago

Author: Richard [Added to the original trac issue at 9.54am, Thursday, 18th September 2008]

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.

openstreetmap-trac commented 3 years ago

Author: Richard [Added to the original trac issue at 11.31am, Saturday, 20th September 2008]

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.