Fabric.js: Fabric.js takes up more memory than canvas

Created on 19 Nov 2018  路  3Comments  路  Source: fabricjs/fabric.js

In android app webview, draw the same page using canvas and fabric.js respectively銆侰anvas takes up 50M of memory锛宐ut fabric.js takes up 200M of memory.Is this situation normal?Is my way of using fabric.js wrong?

possible_feature

Most helpful comment

because there is a cacheCanvas for targeting that is still created. Maybe we can make in a way that is created only if needed.

All 3 comments

fabric.js uses at least 3 canvas, of which 1 is retina enhanced. So maybe is normal.

Use StaticCanvas and enableRetinaScaling set to false and check the differences

Thank you for your answer. According to what you said, change to StaticCanvas and set enableRetinaScaling to false. The memory used is 100M less than before. But it is still much higher than canvas.

because there is a cacheCanvas for targeting that is still created. Maybe we can make in a way that is created only if needed.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

eddieyangtx picture eddieyangtx  路  5Comments

eugene-g13 picture eugene-g13  路  3Comments

semiadam picture semiadam  路  3Comments

AbhijitParate picture AbhijitParate  路  3Comments

keanass picture keanass  路  5Comments