Re:Web Scraping via JavaScript Runtime Heap Snapshots (2022)
by madeofpalk on Tuesday August 08, 2023 @09:45AM
(#37048882)
Most/all minifiers won't actually mangle object property names as those often have observable side effects. You want to grab all the keys for an object and do something different depending on the name of the key - you can no longer do that if the minifier has mangled all the object keys. Not to mention I imagine it would be significantly harder track all references to object keys across an application (as opposed to just local variables).
[ Parent
| on HN ]
Re:Web Scraping via JavaScript Runtime Heap Snapshots (2022)
by btown on Tuesday August 08, 2023 @10:00AM
(#37049083)
As I recall, the only minifier that went this far was Closure Compiler [0] - the caveats documented there still apply!
(Fun fact: I believe that Closure Library, and by extension the Closure Compiler, are still used for the Gmail rich text editor! [1])
[0] https://developers.google.com/closure/compiler/docs/api-tuto...
[1] https://google.github.io/closure-library/source/closure/goog...
Re:Web Scraping via JavaScript Runtime Heap Snapshots (2022)
by nathell on Tuesday August 08, 2023 @11:48AM
(#37050843)
And ClojureScript.
Re:Web Scraping via JavaScript Runtime Heap Snapshots (2022)
by madeofpalk on Tuesday August 08, 2023 @01:12PM
(#37052352)
ClojureScript, being a completely different language which merely uses Javascript as a compilation target lends itself to significantly different optimisation methods.