Skip to content
New issue

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

Prefer eagerly storing vecs into application view #1118

Open
Macroz opened this Issue Apr 15, 2019 · 1 comment

Comments

2 participants
@Macroz
Copy link
Collaborator

commented Apr 15, 2019

Prefer storing data into application view by eagerly computing vectors.

I.e. more this

             :application/resources (mapv #(select-keys % [:catalogue-item/id :resource/ext-id])
                                         (:application/resources event))

And less this

             :application/resources (map #(select-keys % [:catalogue-item/id :resource/ext-id])
                                         (:application/resources event))

@Macroz Macroz created this issue from a note in Rems task board (Ideas) Apr 15, 2019

@luontola

This comment has been minimized.

Copy link
Collaborator

commented Apr 15, 2019

It would be possible to write a test which will dig through the whole application data structure (with reflection or normal map/list traversal?) and report any places where a clojure.lang.LazySeq (or its interface clojure.lang.IPending) was found.

luontola added a commit that referenced this issue Apr 15, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.