Performance caching/momoizing?

We've run into a ceiling and are hoping for a magic configuration or method call suggestion.

Problem:
Our subsnippets are being recalculated on every keyup of the parent snippet despite not utilizing any variables from the parent snippets. UX has jank, especially on chromebooks.

Attempted solution so far:
Move as many calculations as possible into the done handler of the subsnippet urlload handlers.

Considered solutions:
Debounce. This isn't applicable because the actual fetches (urlloads) are not happening on every keyup.

React analogous solution:
In react, we'd simply memorize either the sub component entirely or use useCallback internally on the calculations.

Any ideas, thoughts?

Hi, Text Blaze creates a dependency graph between variables in your snippets so recalculations of formulas should only happen when their inputs change.

It sounds like you may be seeing something different. If possible, could you share a simple example that reproduces what you are seeing?

Scott,

Here's an example parent snippet I've published: Copy of Snippet "Performance Example"

You'll find the subsnippet in the comment so that you can easily and quickly recreate.

And here's a video demonstrating what we are seeing: https://drive.google.com/file/d/15Cc1kE-YYERv8vabmeJY3N5G5atX_A9f/view?usp=sharing

Josh

Thanks! This is very helpful, we'll look into the example.

1 Like

Looking into this, we found an issue where formulas could be unnecessarily recalculated even when their dependencies did not change.

It will be fixed in the next extension release.

Great news! Thanks Scott. We'll let you know how it helps our scenario.

Is there a rough estimate range of deployment dates for that?

I already responded on email, but posting here as well. Around 2-3 weeks from now, the fix should be in production.
If you want earlier access to verify the fix first, you can use the beta extension version (feel free to email me if you need help doing that)