Strange size issue with Dom nodes

Hello, @pandamicro and team,

I was debugging Cocos Creator performance issue on the Chromium-based browser running on Mac.
I noticed a strange behavior regarding the size of the Dom nodes.


The Google tab body div element is of 635x793 dimension.


The Cocos game tab body div element is of 952x1189 dimension.

This strange difference in sizes is causing performance issues due to the larger canvas size that gets drawn because of the bloated window size.

I also work on games using Phaser and the approach to having crisp rendering is to have the canvas size larger than the canvas dom size. Cocos creator does the same and automatically takes DPR into account, I have no complaints about this so far. But the bloated body dom size is leading to an invalid Canvas dom size which in turn is leading to a much bigger Canvas internal size than required.

I hope you can guide me in resolving this issue.

I’m using Cocos Creator 3.5.2

@jare, @pandamicro,

Please share your thoughts on this. This is still affecting the gameplay