Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OS X 10.10 lag #292

Closed
arnabp opened this issue Oct 2, 2014 · 21 comments
Closed

OS X 10.10 lag #292

arnabp opened this issue Oct 2, 2014 · 21 comments

Comments

@arnabp
Copy link

arnabp commented Oct 2, 2014

When launching sim after first booting computer into Yosemite, the sim will lag a lot (see video). Clicking into another window or tab seems to allow the sim to execute whatever was the last command put into the sim.

This problem was usually fixed by closing the sim, putting the computer to sleep mode, then opening the sim back up again. Sometimes it was fixed after playing with other simulations and then coming back to this one, although I also tried simply letting the sim run for a long time and that didn't seem to do anything.

https://drive.google.com/file/d/0BxerAx_XXHB2UVAwaFZwQi1TaG8/edit?usp=sharing

Troubleshooting information (do not edit):
Name: Energy Skate Park: Basics
URL: http://www.colorado.edu/physics/phet/dev/html/energy-skate-park-basics/1.0.0-dev.75/energy-skate-park-basics_en.html
Version: 1.0.0-dev.75
Features missing: touch
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10) AppleWebKit/600.1.22 (KHTML, like Gecko) Version/8.0 Safari/600.1.22
Language: en-us
Window: 1280x761
Pixel Ratio: 1/1
WebGL: WebGL 1.0 (2.1 INTEL-10.0.19)
GLSL: WebGL GLSL ES 1.0 (1.20)
Vendor: WebKit (WebKit WebGL)
Vertex: attribs: 16 varying: 15 uniform: 1024
Texture: size: 4096 imageUnits: 16 (vertex: 16, combined: 16)
Max viewport: 8192x8192
OES_texture_float: true

@samreid
Copy link
Member

samreid commented Oct 2, 2014

Can you please open the Safari Error Console (Develop -> Show Error Console) and let me know if it contains any messages?

@samreid
Copy link
Member

samreid commented Oct 2, 2014

Let's also test whether this problem occurs on other sims.

@samreid
Copy link
Member

samreid commented Oct 3, 2014

Perhaps this will be fixed when Yosemite is out of beta? But I don't feel comfortable publishing a dev version for testing until we know more about this problem.

@arnabp
Copy link
Author

arnabp commented Oct 3, 2014

I tested other sims and the problem doesn't appear to show up on anything but energy stake park. Because I tested this on the gold master "beta", the only difference between this and the public release will simply be Apple changing the name of the build version, so we should treat this as the public release.

@samreid
Copy link
Member

samreid commented Oct 6, 2014

@oliver-phet are you available to open the Safari Error console for this issue and let me know if it contains any messages?

@oliver-phet
Copy link

@arnabp Can you post the Safari Error console?

@arnabp
Copy link
Author

arnabp commented Oct 6, 2014

This has become significantly more complex of an issue. I suddenly cannot reproduce the issue by restarting the computer (the sim is almost always smooth). The only time today that it has lagged was after booting the computer after it shut itself down from low battery, but MacBooks have always had low performance after rebooting this way in my experience.

Because of this, I don't think the error console is fully representative of the problem, because this is the code copied while the sim seemed to be running okay, but I'll put down everything I noticed anyway:

this was listed 4x:
"[Error] Cross-origin image load denied by Cross-Origin Resource Sharing policy.
(anonymous function) (energy-skate-park-basics_en.html, line 100)
u (energy-skate-park-basics_en.html, line 93)
o (energy-skate-park-basics_en.html, line 93)
u (energy-skate-park-basics_en.html, line 93)
o (energy-skate-park-basics_en.html, line 93)
u (energy-skate-park-basics_en.html, line 93)
o (energy-skate-park-basics_en.html, line 93)
u (energy-skate-park-basics_en.html, line 93)
o (energy-skate-park-basics_en.html, line 93)
u (energy-skate-park-basics_en.html, line 93)
o (energy-skate-park-basics_en.html, line 93)
u (energy-skate-park-basics_en.html, line 93)
o (energy-skate-park-basics_en.html, line 93)
u (energy-skate-park-basics_en.html, line 93)
o (energy-skate-park-basics_en.html, line 93)
u (energy-skate-park-basics_en.html, line 93)
o (energy-skate-park-basics_en.html, line 93)
u (energy-skate-park-basics_en.html, line 93)
o (energy-skate-park-basics_en.html, line 93)
u (energy-skate-park-basics_en.html, line 93)
o (energy-skate-park-basics_en.html, line 93)
u (energy-skate-park-basics_en.html, line 93)
(anonymous function) (energy-skate-park-basics_en.html, line 93)"

this is everything else:
"[Log] screen 0 created, total time: 122ms, model: 4ms, view: 118ms (energy-skate-park-basics_en.html, line 115)
[Log] screen 1 created, total time: 78ms, model: 2ms, view: 76ms (energy-skate-park-basics_en.html, line 115)
[Log] screen 2 created, total time: 73ms, model: 2ms, view: 71ms (energy-skate-park-basics_en.html, line 115)
[Error] Failed to load resource: the server responded with a status of 404 (Not Found) (preload.js.map, line 0)"

Finally, another issue that doesn't seem to be related to the lag issue is a frame-rate drop issue. When safari is in full screen (or even in windowed mode but enlarged), the sim's framerate drops to about 30-40 fps. Rescaling the window to a smaller size reverts the framerate back to 60 fps. I originally realized what was happening after opening the error console, which forces the window to resize, so I don't know any way to get the console while this issue is being produced.

@samreid
Copy link
Member

samreid commented Oct 6, 2014

I moved the "runs slow in full screen" issue to #293.

@samreid
Copy link
Member

samreid commented Oct 6, 2014

I tried launching espb 1.0.0-dev.75 after a fresh boot on my OS X 10.9.5 + Safari 7.1 and didn't see any slowdown.

@arnabp
Copy link
Author

arnabp commented Oct 6, 2014

This is definitely a problem I've only seen in OS X 10.10 + Safari 8...and inconsistent at that. After using my laptop for an hour or so doing light tasks (excel and web browsing), I went back to the sim, it lagged for a few minutes, and then went back to running smoothly again after I opened up the error console. I'll continue to play around with the sim until I can find a consistent way to reproduce the lag, but for now it seems like it sometimes occurs after reboot and sometimes occurs after periods of inactivity.

@samreid samreid assigned samreid and unassigned arnabp Oct 6, 2014
@samreid
Copy link
Member

samreid commented Oct 6, 2014

Do you think it might be related to phetsims/joist#140?

@samreid
Copy link
Member

samreid commented Oct 7, 2014

I am somewhat interested in updating my OSX to Yosemite to investigate this issue, but I don't want to lose the ability to test on Safari 7.

@samreid
Copy link
Member

samreid commented Oct 7, 2014

@ariel-phet can you please read through this thread #292 and advise?

@samreid samreid assigned ariel-phet and unassigned samreid Oct 7, 2014
@ariel-phet
Copy link

Since this issue is intermittent and unclear, let us not address at the current time. Once we have done dev and RC testing we might have a better idea if this is an isolated quirk or not.

@ariel-phet ariel-phet assigned samreid and unassigned ariel-phet Oct 8, 2014
@arnabp
Copy link
Author

arnabp commented Oct 8, 2014

I don't think this is related to phetsims/joist#140 although it's possible that code problem may be similar. This issue is always apparent immediately after opening up the same, and doesn't seem to appear after waiting a while unless it is for extensive periods of the computer being in sleep mode.

I've also discovered that despite the fact that I can't consistently reproduce the problem, I can get rid of it immediately simply by reducing the screen size.

@samreid
Copy link
Member

samreid commented Oct 8, 2014

I've also discovered that despite the fact that I can't consistently reproduce the problem, I can get rid of it immediately simply by reducing the screen size.

This may indicate a memory problem if there are too many raster layers.

@samreid
Copy link
Member

samreid commented Oct 8, 2014

Normally I am just seeing one canvas layer, but sometimes on the 3rd screen I can get a track svg layer to appear between 2 canvas layers.

@samreid
Copy link
Member

samreid commented Oct 8, 2014

@arnabp which machine are you reporting testing for? What make, model, year?

@arnabp
Copy link
Author

arnabp commented Oct 8, 2014

13-inch Unibody Macbook Pro, Early 2011
(2.7 GHz Core i7 and 4GB 1333 MHz RAM)

samreid added a commit that referenced this issue Oct 8, 2014
@samreid
Copy link
Member

samreid commented Oct 8, 2014

In the above commit, I added a layer to ensure there are never 2 canvases. This should help with memory if it was a problem (though this doesn't impact the 1st 2 screens).

@samreid samreid removed their assignment Oct 8, 2014
@samreid
Copy link
Member

samreid commented Oct 17, 2014

I tested on OSX 10.10 on MacBook Air 11-inch Mid 2012 using Safari Version 8.0 (10600.1.25). I launched immediately after rebooting, and the simulation was speedy and smooth. I think we should close this issue, we can reopen it if more reports come in that indicate this problem.

@samreid samreid closed this as completed Oct 17, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants