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

Reactive chunks #16

Closed
cicdguy opened this issue Aug 5, 2021 · 1 comment
Closed

Reactive chunks #16

cicdguy opened this issue Aug 5, 2021 · 1 comment

Comments

@cicdguy
Copy link
Contributor

cicdguy commented Aug 5, 2021

I knew that sooner or later this will bounce back, but didn't expect this early!

In this case reactivity of chunks_push won't do the trick because get_chunks_object is a singleton and will always return the result of the last evaluation in the module. This means, that if you change the tab from tab1 -> tab2 chunks are updated. But when you back `tab2 -> tab1z chunks are not updated at all, because dependencies of tab1 didn't change - so the chunks are not recomputed.
Even when you click Debug Info you will see the previous code. Even more funny, Show R code will be also from tab2 (where last evaluation took place).

We need to extend get_rcode_srv module arguments by chunks, and pass latest chunks object into this module. Problem is that we don't have a chunks object specified in the namespace which means that elo <- reactive(get_chunks_object(...)) and then get_rcode_srv(..., chunks = elo) will be a promise and not a reactive object!

@pawelru we need to explicity set chunks in the module namespace chunks <- init_chunks() and then chunks$push()


Current solution might not be sufficient also from the performance perspective. Reactive value is changed each time chunk is evaluated which causes debug info to recompute. In current state this slows down the app.

Provenance:

Creator: gogonzo
@gogonzo
Copy link
Contributor

gogonzo commented May 30, 2022

Not relevant assuming this insightsengineering/NEST-roadmap#45

@gogonzo gogonzo closed this as completed May 30, 2022
This issue is being transferred. Timeline may not be complete until it finishes.
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