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

Question about scheduler batching and observe optimizations. #36

Open
Dai696 opened this issue Nov 20, 2018 · 2 comments
Open

Question about scheduler batching and observe optimizations. #36

Dai696 opened this issue Nov 20, 2018 · 2 comments

Comments

@Dai696
Copy link

Dai696 commented Nov 20, 2018

First of all I wanna say sorry for asking so many questions. I'm sure I've overwhelmed you and I apologize for it, it won't happen again. This mostly should be all the remaining questions I have.

I'm trying to speed up my observes by batching stuff together in a more optimal way.

I experimented with queue and set and found them both really useful.

I noticed that if I setInterval Set it always runs once the first reaction is fired. And doesn't stop either (i guess unless I manually stop it)

I was curious if their was a way to combine the automatic process of priorities, with the interval from set. I wanted to try making the priority low, and when it does fire it can only if the interval allows it.

Lastly I have each instance placed in the map set too observe its own observable self from the store to update properties. (this was carried from my mobx way of doing it)

I noticed that this way is very slow in this library compared to mobx so I assume its not batching in the same way and I'm doing something wrong here(I may have been doing wrong all along anyway)

Is there an easy way to batch the process of observing itself with other instances doing the same type of observing?

Or should I have this type of observable process done in a loop through all the instances outside the instance, rather then in the instance itself.

Thank you for taking the time to explain this stuff for me this is a really incredible library.

@solkimicreb
Copy link
Member

Hi! I will try to answer your questions today. Thanks for using the lib ☺️

@Dai696
Copy link
Author

Dai696 commented Nov 24, 2018

Thank you, please take your time! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants