ClojureScript

Enable *warn-on-reflection*

Details

  • Type: Enhancement Enhancement
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:

Description

We have *warn-on-reflection* enabled for the cljs.analyzer and cljs.compiler namespaces.

This ticket asks that this also be enabled on other large, performance-critical namespaces, like cljs.closure, where reasonable.

This would help silly perf issues. For example this one call, when revised to avoid reflection by using clojure.string/starts-with?, improves the speed of indexing node_modules by a factor of 2: https://github.com/clojure/clojurescript/blob/132d3aa232921a3cea66f830d61c89be78c581cb/src/main/clojure/cljs/closure.clj#L2464

Activity

Hide
David Nolen added a comment -

Sounds good to me!

Show
David Nolen added a comment - Sounds good to me!

People

Vote (4)
Watch (1)

Dates

  • Created:
    Updated: