[Bug]: Named expression defined as a cell range does not recalculate
Description
When using named expressions in HyperFormula, formulas update correctly if a value is initially set in a referenced cell. However, if we update a cell that already has a value, the formula does not recalculate automatically.
The issue is only resolved when we manually call hfInstance.rebuildAndRecalculate(), which pauses our application and significantly slows down performance in our large-scale application.
Steps to Reproduce: Open this Demo Link Click Run Logic to see initial calculations working. Observe that updating a cell does not trigger recalculation. Manually call rebuildAndRecalculate() → The formula updates, but at the cost of app performance.
Expected Behavior: ✅ Named expressions should always recalculate when referenced cells are updated. ✅ No need for rebuildAndRecalculate() for normal updates.
Actual Behavior: ❌ Updating a cell that already has a value does not trigger recalculation. ❌ rebuildAndRecalculate() is required but causes performance issues in large applications.
Impact on Our Application: 🚨 Our app is large, and calling rebuildAndRecalculate() frequently slows it down and freezes the UI. We need a more efficient solution that ensures named expressions update automatically when cell values change.
Video or screenshots
No response
Demo
https://stackblitz.com/edit/druuakr9?file=index.ts
HyperFormula version
HyperFormula 3.0.0
Your framework
Vue 3
Your environment
Chrome 133 on macOS 15.3.1
Hi @Esmail-Rahmani, thank you for reaching out.
I can confirm it is a bug. I'm adding it to our backlog.
Hi! Just following up on this bug.
Hi @kenken182
This issue is not yet scheduled to be fixed. We will make sure to update you as soon as it changes.
@sequba Could you please review this PR? We encountered a significant performance bottleneck in our application due to this bug.
Hi @AbdulQaharRahmani I informed the team about the pull request. We should be able to review it in the next sprint session.
Hi @AMBudnik , I hope you're doing well! I am following up regarding the pull request we discussed earlier (fixing named expressions performance). Has there been any update or progress on the review? We're still experiencing some issues on our side and would greatly appreciate any feedback or timeline.
Thanks again!
Hi @Esmail-Rahmani
I can see that my colleague is already assigned to review this pull request.
Now he's finishing other tasks but should move to the review soon.
Hi @Esmail-Rahmani
I am happy to share the good news. We just launched HyperFormula v3.0.1, where this issue is fixed.
Thank you for the contribution!
Here https://hyperformula.handsontable.com/guide/release-notes.html, you can read more about the changes in this version.
CC @kenken182 @AbdulQaharRahmani