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

Performance slowdown since p5js v0.5.14 #161

Closed
bohnacker opened this issue Jan 15, 2018 · 13 comments
Closed

Performance slowdown since p5js v0.5.14 #161

bohnacker opened this issue Jan 15, 2018 · 13 comments

Comments

@bohnacker
Copy link
Member

Since using p5js version 0.5.14 the speed of drawing things slowed down noticably on my machine. I haven't measured but sketches that are drawing a lot of elements are about four times slower.

Am I the only one with this problem? I haven't found any similar issues posted on https://github.com/processing/p5.js/issues.

@b-g
Copy link
Member

b-g commented Jan 15, 2018

@generative-design/authors Can everyone please check this ... and tell us the behaviour on their machines? Please use the branch pre-release for testing.

@bohnacker
Copy link
Member Author

I've added v0.5.12, v0.5.14 and 0.5.16 to the libraries folder to make it easier for you to test.

@bohnacker
Copy link
Member Author

And added a test folder.

@joeyklee
Copy link
Contributor

joeyklee commented Jan 16, 2018

On my machine... macbook pro v10.12

on chrome 63.0.3239.132 (Official Build) (64-bit):

  • index-v0.5.12 is the snappiest. Then the current and 0.5.14 are roughly the same.

on firefox 57.0.4 (64-bit):

  • index-v0.5.12 performs slightly better than the others. The current and 0.5.14 perform roughly the same.

@bohnacker
Copy link
Member Author

Same here. Tested with chrome 64.0.3282.85 (64-bit) and firefox 57.0.4 (64-bit) on macbook pro with os x 10.12.
p5 v0.5.12 is at least twice as fast than v0.5.14 or 16.

@joeyklee
Copy link
Contributor

Thanks for looking into it @bohnacker ! How do you think we should proceed?

@b-g
Copy link
Member

b-g commented Jan 16, 2018

@joeyklee Can you ask via your insider link the p5js dev whether this is a know issue and whether there is a new version coming up addressing this? I couldn't find in any pointers in the release notes ... and @bohnacker said he couldn't find any slow perf issues on the p5 github either.

@joeyklee
Copy link
Contributor

@b-g does it make sense to post to the P5js issues? If so, then I'd reference our issue thread here for reference and then reach out to our contacts. Cool?

@b-g
Copy link
Member

b-g commented Jan 17, 2018

@joeyklee please!

@joeyklee
Copy link
Contributor

Please see discussion forming here: processing/p5.js#2549 (comment)

@joeyklee
Copy link
Contributor

@bohnacker I added p5.disableFriendlyErrors = true; to the beginning of the sketch.js in the test. It feels that it does indeed improve the performance. Please give it a try to see if you also notice that there is a speed up.

@bohnacker
Copy link
Member Author

@joeyklee Gave it a try with the test sketch and the frameRate seems again similar to v0.5.12. I'm not sure what to do. It sounds like the new "friendlyErrors" feature would be something that we want to keep for our sketches. Still, for some of the book sketches it would be nicer to have the frameRate as fast as possible.

We should probably pick the sketches by hand where we add this line.

@bohnacker
Copy link
Member Author

Just tried the test sketch with the current verision (0.5.16) of p5.min.js. It is another 10 to 20% faster than the corresponding p5.js. So best would be to switch to the min versions. That also would keep the additional line out of our sketches.
I'll do that and close this issue afterwards.

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

3 participants