LZ-string 2.0 and preceding RC
See original GitHub issueSo let’s decide once and for all what we need to do to merge that pull request
Here’s a TODO list with some first thoughts, I’ll update it as the discussion evolves. It’s very elaborate, but that’s just because I like to keep it fine-grained.
Decide what to include
Suggestions:
- LZ-string “classic” - backwards compatible with 1.4.4. If it breaks on systems where 1.4.4 worked, it is a bug
- Unsafe Array version? Should it include backwards compatibility guarantee?
- a separate ES6 version? It would take me only minor tweaks to “upgrade” the current version (use
Map()
, etc).
Test for bugs
- Desktop
- Edge
- Earliest version of IE that is supported
- Chromium
- Firefox
- Safari
- Opera
- Mobile
- Chromium
- Firefox
- Safari
- Opera
Benchmarks
-
Decide on body of test cases
- static website
- large CSS files
- JSON files
- a book from Project Gutenberg, like Pride & Prejudice, or In Praise of Folly
- A realistic large body of 16-bit characters? Is there an Asian equivalent to Project Gutenberg?
- edge-cases like the full UTF16 range, as it breaks the
unsafe
version
-
Desktop
- Edge
- Earliest version of IE that is supported
- Chromium
- Firefox
- Safari
- Opera
-
Mobile
- Chromium
- Firefox
- Safari
- Opera
Have a release candidate alongside current version for <period of time> to find bugs
For how long, and how do we do this on npm?
Issue Analytics
- State:
- Created 5 years ago
- Reactions:3
- Comments:7
Top Results From Across the Web
Issues · pieroxy/lz-string - GitHub
... compression algorithm for JavaScript. Contribute to pieroxy/lz-string development by creating an account on GitHub. ... LZ-string 2.0 and preceding RC.
Read more >lzstring package - All Versions - Pub.dev
Dart implementation of lz-string compression algorithm. Originally written in JavaScript, for more details, please refer to ...
Read more >qoopido.demand | Yarn - Package Manager
Qoopido.demand is a modular, flexible and 100% async JavaScript module loader with a promise like interface that utilizes localStorage as a caching layer....
Read more >August 2022 - Zoom
Apache License 2.0 (@ampproject/remapping 2.1.2, @ampproject/remapping 2.2.0, ... 4.2.2, gradle-plugins 2.9, gradle-plugins 5.6.1, gradle-wrapper 4.4-rc-6, ...
Read more >iot - River Thames Conditions - Environment Agency - GOV.UK
Tgn squadron season 2, Perfect curl by babyliss pro singapore, ... 1981 corvette price guide, Morsbach realschule, Comma before which in a sentence, ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Is that ES6 versions tree-shakeable? That’s really cool though - more browsers are supporting it all the time, plus useful for Webpack / Rollup 😃
The arrow function is meant to be slightly faster than a
function
due to it not being a fully-featured version (ie, they are different specs, and not just in binding) - if it’s in something that’s called a lot then I’d hope it’d be different, but I’ve not seen tests so apart from that snippet of information I have no opinions (and generally compile via Babel).We can test via BrowserStack (they give free accounts for Open Source projects) - but I’ve not written automated tests for it before, plus not sure if it can report back to a Github PR - I’ve seen something via TravisCI that implies it can be setup, but would need to look into it when I have time. In the meantime I’d say just getting a pile of automated tests together, they can always be repackaged later - better to have comprehensive automated tests that indicate functionality breaks on any PR, and some manual tests for in-browser testing.
Test whether the bottleneck is the call to
Map.has()
. Not quite, but the alternative is faster on both Chrome and Firefox:https://run.perf.zone/view/LZString-variants-14-07-2018-minified-compress-documentbodyinnerHTML-no-Maphas-1531582559384