Skip to content

copy function slow performance since v0.10.0 #5237

Open
@Erik167

Description

@Erik167

Most appropriate sub-area of p5.js?

  • [x ] Core/Environment/Rendering

Details about the bug:

  • p5.js version: since v0.10.0
  • Web browser and version: Edge v90
  • Operating System: Windows 10
  • Steps to reproduce this:

The framerate drops significantly (3fps), when using the copy() function in the context shown in the examples below. I tried to recreate the tutorial of Tim Rodenbröcker about kinetic typography in p5.js.
This happens when p5 versions since 0.10.0 are used. It runs smoothly with versions before 0.9.0.

v0.9.0: https://editor.p5js.org/eriksiemund/sketches/ZD7V3_qKM
v.1.3.1: https://editor.p5js.org/eriksiemund/sketches/79w6n7V2W

The issue is already posted in the p5 forum, where micuat suggested a solution. He replaced copy() with context.drawImage and made a guess, that it might have something to do with the implementation of loadPixels since v0.10.0.

Fix by misuat: https://editor.p5js.org/micuat/sketches/XXyKscqN9

Link to forum thread: https://discourse.processing.org/t/p5-js-copy-function-slow-performance-since-version-0-10-0/30007

Thank you in advance!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions