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

[BUG] $action-log always evaluates all functions in its context #8189

Open
yaisog opened this issue May 15, 2024 · 1 comment
Open

[BUG] $action-log always evaluates all functions in its context #8189

yaisog opened this issue May 15, 2024 · 1 comment

Comments

@yaisog
Copy link
Contributor

yaisog commented May 15, 2024

Describe the bug

When functions are defined in the context of an ActionLogWidget (usually globally defined functions), these are always evaluated, even if they are not used in the output. Also, their filter runs are given all[tiddlers] as input, so they might need much more computation time that they were designed for.

Expected behavior

They should not be evaluated in order to keep things running fast.

To Reproduce

  1. Go to tiddlywiki.com
  2. Create a tiddler tagged $:/tags/Macro with this content
\function .slow() [range[1000]] :map[all[tiddlers]search:*[TiddlyWiki]] +[first[]]
  1. Create another tiddler with this content
<$button actions="""<$action-log message="Button pressed." />""">GO</$button>
  1. Open browser console and press button
  2. Wait

Screenshots

No response

TiddlyWiki Configuration

No configuration dependence.

Additional context

No response

@pmario
Copy link
Contributor

pmario commented May 15, 2024

I can confirm, that there is a significant slowdown, even if everything is in the same tiddler.

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