We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The CLJS Bean library provides a faster alternative to js->clj, and this can be used in io/file-attributes for a substantial speedup:
js->clj
io/file-attributes
Before:
cljs.user=> (require '[planck.io :as io] '[planck.core :refer [file-seq]]) nil cljs.user=> (let [files (doall (file-seq "/Users/mfikes/Documents"))] #_=> (time (transduce (comp (map io/file-attributes) (map :reference-count)) + files))) "Elapsed time: 31.728287 msecs" 1432
After:
cljs.user=> (require '[planck.io :as io] '[planck.core :refer [file-seq]]) nil cljs.user=> (let [files (doall (file-seq "/Users/mfikes/Documents"))] #_=> (time (transduce (comp (map io/file-attributes) (map :reference-count)) + files))) "Elapsed time: 13.202166 msecs" 1432
The text was updated successfully, but these errors were encountered:
Improve perf of io/file-attributes using CLJS Bean
caed926
Fixes #969
Wow, that's pretty dramatic. Looks like a spiffy little library :)
Sorry, something went wrong.
mfikes
Successfully merging a pull request may close this issue.
The CLJS Bean library provides a faster alternative to
js->clj
, and this can be used inio/file-attributes
for a substantial speedup:Before:
After:
The text was updated successfully, but these errors were encountered: