Dan Holmsand
4160704bdc
Store cached reactions directly on function/object
2015-10-02 21:49:35 +02:00
Dan Holmsand
4ee08ea18e
Use array for notify
2015-10-02 20:37:37 +02:00
Dan Holmsand
0cb0de8fc4
Cleanup and perf fixes
2015-10-02 17:34:08 +02:00
Dan Holmsand
4007e6db74
Simplify capture logic
2015-10-02 14:30:25 +02:00
Dan Holmsand
9a13446eea
Try to avoid allocating new array in notify-deref-watcher
2015-10-02 13:02:37 +02:00
Dan Holmsand
eb83776b3d
Use transients for better caching performance
2015-10-02 10:18:48 +02:00
Dan Holmsand
6aa26253d8
Use a plain method for running reaction internally
...
Gives quite a big speedup
2015-09-30 10:32:16 +02:00
Dan Holmsand
94ad9952d8
Use empty context instead of *flushing* in flush!
2015-09-30 09:49:11 +02:00
Dan Holmsand
d0f480f3f2
Remove hack to support sync reactions
...
It became too messy, risky and confusing to be worth it.
2015-09-30 09:40:57 +02:00
Dan Holmsand
3fca2e5d41
Make reactions async by queueing changes instead
...
Reactions now put themselves in a queue when they get a
callback from an atom. The queue is flushed before rendering, and
on deref on individual reactions.
This turns out to perform much better in many cases.
2015-09-30 08:56:06 +02:00
Dan Holmsand
e39bb33ccc
Use plain array instead of set for tracking watched atoms
...
Turns out to be much, much faster in most cases
2015-09-27 16:04:06 +02:00
Dan Holmsand
7cd2d7d860
Do a little cleanup in template.cljs
2015-09-27 11:14:32 +02:00
Dan Holmsand
83b21167ea
Optimize common case of listening to one derefable
2015-09-27 11:11:15 +02:00
Dan Holmsand
97194b6fca
More cleanup in ratom.cljs: get rid of IComputedImpl
...
Calling object methods and plain functions is faster.
2015-09-27 09:46:44 +02:00
Dan Holmsand
6e3a2b415d
Fix stupid with-let bug
2015-09-27 00:07:19 +02:00
Dan Holmsand
4f629d0a34
Big cleanup of ratom.cljs
...
Use a couple of utility functions, and better formatting to
reduce noise.
Don't use some? in performance critical code - avoid a function call.
2015-09-26 23:10:31 +02:00
Dan Holmsand
ab36316c82
Swap arg order in _try-run
2015-09-26 18:13:07 +02:00
Dan Holmsand
5a23bcaad5
Don't call on-dispose in non-reactive deref for now
2015-09-26 18:00:30 +02:00
Dan Holmsand
f940ac3f38
Slimline batching a little
2015-09-26 14:31:06 +02:00
Dan Holmsand
6a206eccf3
Simplify with-let even more
2015-09-26 14:30:11 +02:00
Dan Holmsand
b17ff0a576
Pass state to on-dispose in Reaction
...
Use to simplify with-let some more
2015-09-26 13:59:43 +02:00
Dan Holmsand
415ecd64fd
Simplify with-let and tweak performance
2015-09-26 13:12:59 +02:00
Dan Holmsand
b1294d50e5
Start to make create-class return a proper React class
2015-09-25 20:49:48 +02:00
Dan Holmsand
5fceda2aae
Add tests for lifecycle methods
2015-09-25 13:44:10 +02:00
Dan Holmsand
64d1e11966
Add obj and munging to interop
...
.' and .! now behaves just like builtin interop, except that
they work the same under advanced compilation.
2015-09-25 11:48:50 +02:00
Dan Holmsand
55a4b4e1df
Omit tests running in node
2015-09-25 11:48:11 +02:00
Dan Holmsand
e4fee70ac2
Add support for trapping warning/error messages
...
And use in test for with-let
2015-09-24 17:02:18 +02:00
Dan Holmsand
f62bf44661
Update demo to use rswap!
...
and fix old-style url in new051
2015-09-24 11:05:37 +02:00
Dan Holmsand
be1dfaeba7
Merge branch 'with-let'
2015-09-24 11:00:32 +02:00
Dan Holmsand
572e4bbf96
Merge branch 'betterdemo'
2015-09-24 10:59:55 +02:00
Dan Holmsand
cfcf356743
Add track, track!, dispose! and with-let to core
2015-09-24 10:19:30 +02:00
Dan Holmsand
034ffa6b7f
More tests for with-let
2015-09-24 09:23:21 +02:00
Dan Holmsand
28d454ece9
Include size of cached reactions in tests
2015-09-24 07:48:03 +02:00
Dan Holmsand
d476222abb
Optimize track! and with-let a bit
2015-09-23 20:14:29 +02:00
Dan Holmsand
e1585f6730
Add more with-let tests, and fix dispose bug
2015-09-23 19:40:19 +02:00
Dan Holmsand
9163695832
Start adding more tests for with-let
2015-09-23 17:02:48 +02:00
Dan Holmsand
119fbfe173
Add a couple of more tests for with-let
2015-09-23 15:55:57 +02:00
Dan Holmsand
51163c1d07
Rename to with-let, add basic test
2015-09-23 10:39:49 +02:00
Dan Holmsand
a73761e72e
Warn if the same with-kept is used more than once
2015-09-21 10:49:43 +02:00
Matthew Jaoudi
fea897eca1
Merge pull request #188 from danielcompton/contributing
...
Add CONTRIBUTING.md document
2015-09-20 20:13:09 -07:00
Daniel Compton
fdbc0f23b9
Add CONTRIBUTING.md document
2015-09-21 15:00:32 +12:00
Dan Holmsand
6c9f71e511
Rename testmonitor
2015-09-19 19:03:29 +02:00
Dan Holmsand
ca5ce00c34
Rename monitor -> track, and monitor! -> track!
2015-09-19 16:49:13 +02:00
Dan Holmsand
ea7cd26cf5
Rename with-resource to with-kept and clean up
2015-09-19 16:36:49 +02:00
Dan Holmsand
0b553ef6bd
Reorg with-resource
2015-09-19 09:14:14 +02:00
Dan Holmsand
37703c2834
Make with-resource use a proper key
2015-09-19 08:46:26 +02:00
Dan Holmsand
6f448f296f
on-dispose should always be called in Reaction
2015-09-18 17:59:40 +02:00
Dan Holmsand
897b766624
Experiment with with-resource
2015-09-18 14:23:50 +02:00
Dan Holmsand
a5d99b8fcd
Simplify syntax highlighting a bit
...
but not as much as I had hoped...
2015-09-17 15:10:27 +02:00
Dan Holmsand
2558cd6708
A little cleanup
2015-09-16 17:55:45 +02:00