question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Settle on a Signal `==` performance solution

See original GitHub issue

Signals only emit values that are different from their current state. “different” means Signal does an == check. This is very convenient, and in general improves performance by eliminating redundant DOM calls, but can potentially be expensive in certain situations, e.g. when comparing large, almost identical Map-s.

Currently we have com.raquo.airstream.util.Ref to deal with this, but the wrapping is annoying to deal with. Perhaps I should provide some helpers to deal with wrapped values easier, but I’m not convinced that this is the best solution.

I will look more into this when I get the time to work on memoization in Laminar (https://github.com/raquo/Laminar/issues/38), I think there might be some common ground between these issues.

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
raquocommented, Apr 27, 2019

I implemented composeChanges pretty much as described here. So far I like using it. I’ll marinade on this for a while, and will likely follow the general idea from my last comment.

1reaction
fdietzecommented, Feb 4, 2019

Comparing with == might be expensive, but has no surprises. so it should be the default.

I can think of several options for giving users more control over performance:

  • write own equals method
  • disable comparison for specific types
  • disable comparison for specific nodes in the dataflow-graph
Read more comments on GitHub >

github_iconTop Results From Across the Web

Any idea how to wait for the changing signal to settle over time ...
Hi. I am going to measure the DC signal in Voltage, using the basic averaged DC-RMS or averaged DC-RMS function. The problem is...
Read more >
Move and Settle Time - Dover Motion
Dover Motion's experts discuss move and setting time and how to limit them in this informational article.
Read more >
How to select the right multiplexer or signal switch to maximize ...
In this presentation, I'll be covering the critical parameters of switches and multiplexers and how they impact on system performance. We are ...
Read more >
Introduction: PID Controller Design
The controller takes this new error signal and computes an update of the ... Furthermore, the rise time is about one second, and...
Read more >
Settling time for bilevel waveform - MATLAB settlingtime
settlingtime(___) plots the signal and darkens the regions of each transition where settling time is computed. The plot marks the location of the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found