# P5.js goes to Processing abnormally slow！

**URL:** <https://discourse.processing.org/t/p5-js-goes-to-processing-abnormally-slow/31984>\
**Category:** Coding Questions\
**Created:** [August 28, 2021, 1:48pm UTC](https://discourse.processing.org/t/p5-js-goes-to-processing-abnormally-slow/31984 "2021-08-28T13:48:21Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![jeremydouglass](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jeremydouglass/32/20_2.png) [@jeremydouglass](https://discourse.processing.org/u/jeremydouglass)\
**Post date:** [August 28, 2021, 10:28pm UTC](https://discourse.processing.org/t/p5-js-goes-to-processing-abnormally-slow/31984/4 "2021-08-28T22:28:48Z")

</div>

Hmm. I’m not seeing the same visual output behavior from the two codes, so this seems it might be more than just a performance question. Some differences at a glance – Processing sketch has a fixed size (as KumuPaul noted) – also, it is P3D for some reason…? There are a lot of duplicate local variables in class methods that could just be `this.myclassvar`. The matrix is getting pushed and popped inside the class, which isn’t strictly necessary with this design – you could throw away the PVector center from the class and put one translate statement in draw – but matrix stack changes are only happening 6 times per frame, not 6000, so really not a big deal… and KumuPaul says it isn’t differences in blendMode… my next guess would be something inside drawWave or addVel, although I haven’t looked closely. First goal would be to have the sketches actually producing similar output, then see if there are optimization steps to take.

---

_[View the full topic](https://discourse.processing.org/t/p5-js-goes-to-processing-abnormally-slow/31984)._
