flexsurfer / re-frisk-remote

re-frisk remote library for debugging re-frame applications using leiningen re-frisk plugin
18 stars 5 forks source link

Compute event time diff before db diff #8

Closed janherich closed 6 years ago

janherich commented 6 years ago

Computing app-db-diff is expensive procedure where time to compute grows linearly with size of the db. It dominates the event-time displayed (of most events doing any change in db) even when re-frame app-db is quite small, when it's little bit bigger, the time to compute the diff totally dwarfs the actual event execution time, so it's essential that the diffing operation is excluded from the event-time to not skew the results. This PR achieves that by simply moving event-time computation higher up, ensuring that it's evaluated before diffing.

flexsurfer commented 6 years ago

good catch @janherich , thanks!