ClojureScript

Improve reader performance on Firefox/Windows

Details

  • Type: Enhancement Enhancement
  • Status: Open Open
  • Priority: Minor Minor
  • Resolution: Unresolved
  • Affects Version/s: 1.9.76
  • Fix Version/s: None
  • Component/s: None
  • Environment:
    Firefox on Windows
  • Patch:
    Code

Description

cljs.reader/read-string speeds up by a factor of 2 on Firefox/Windows through this change without complicating the code.

(Other JS engines, including Firefox on Linux/Mac do not seem to be affected as significantly.)

Activity

Hide
David Nolen added a comment -

It would be nice to have a bit more information on this ticket as to what Google Closure does that's unnecessary or whether this path is actually a faithful port of Clojure behavior (copies the implementation of the EDN reader in these hot spots??). Finally the patch names David Frese, have they submitted a CA?

Thanks!

Show
David Nolen added a comment - It would be nice to have a bit more information on this ticket as to what Google Closure does that's unnecessary or whether this path is actually a faithful port of Clojure behavior (copies the implementation of the EDN reader in these hot spots??). Finally the patch names David Frese, have they submitted a CA? Thanks!
Hide
Michael Sperber added a comment -

I believe the Google functions are too general, work on strings in addition to characters etc.

It's not clear to us though why only Firefox on Windows benefits.

(David Frese is a co-worker - yes, has submitted a CA.)

Show
Michael Sperber added a comment - I believe the Google functions are too general, work on strings in addition to characters etc. It's not clear to us though why only Firefox on Windows benefits. (David Frese is a co-worker - yes, has submitted a CA.)
Hide
Mike Fikes added a comment -

Patch no longer applies; needs re-baseline.
Also, doesn't work with git am; recommend creating patch using https://clojurescript.org/community/patches

Show
Mike Fikes added a comment - Patch no longer applies; needs re-baseline. Also, doesn't work with git am; recommend creating patch using https://clojurescript.org/community/patches

People

Vote (0)
Watch (4)

Dates

  • Created:
    Updated: