Open longchuan opened 5 hours ago
Perhaps,slice the useragent to 1/2,and exec the "edg" will be more faster. Maybe,the old edge's useragent was "edge" Perhaps,cocos engine can let developers to select the supported browser.
And,cancel the method of "toLowerCase" will be more faster.The useragent will not be change in many times.
Perhaps,slice the useragent to 1/2,and exec the "edg" will be more faster.
such as:
if(useragent.length>12){
useragent = useragent.slice(useragent.length/2,useragent.length);
}
calculate the time of "if" and the time of slice,this will solve many problems about what causes project a slow one. and put the more time used part to init. For the end,let developers to load them in init. Cocos' init was not necessary.
Cocos Creator version
3.8.4
System information
windows 11
Issue description
The useragent of windows edge.And there were many errors in mobile too.
Relevant error log output
No response
Steps to reproduce
Minimal reproduction project
No response