The console console.log () prints a lot of logs, will it affect the browser stutter?

console console.log () prints a lot of logs, will it affect the browser stutter?

May.22,2021

will have an impact, so you'd better rewrite the log function

when you publish.
console.log = function(){}

avoid using console.log in production
console.log objects will not be reclaimed by the browser garbage collection mechanism, which will cause browser stutters


automatic packaging tools such as webpack automatically remove this kind of output when releasing the official version


Yes, refer to https://developer.mozilla.org.://codeshelper.com/q/1010000006467170/a-1020000006467332.

console.time('time')
console.log(JSON.parse(JSON.stringify(new Object())))
console.timeEnd('time')

output:

VM52:2 {}
VM52:3 time: 3.43017578125ms
undefined
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1ebfd3a-5d89f.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1ebfd3a-5d89f.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?