https://bugs.documentfoundation.org/show_bug.cgi?id=172997
Bug ID: 172997
Summary: EDITING: implement Common Subexpression Elimination
when compiling Named Expressions
Product: LibreOffice
Version: 26.2.3.2 release
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: enhancement
Priority: medium
Component: Calc
Assignee: [email protected]
Reporter: [email protected]
Description:
I make a pretty heavy use of Named Ranges and Expressions. It's not rare for a
named expression to refer to another named expression multiple time.
As far as I can tell, these expressions are currently simply inlined. Which can
grow the expression tree exponentially. For instance:
double0 = A1
double1 = double0 + double0
double2 = double1 + double1
...
double14 = double13 + double13
This produces an Err:512 starting at double13.
However, I could not hit the Err:512 with a chain:
chain0 = A1
chain1 = chain0
chain2 = chain1
...
This strongly suggest a very simple inlining of used named expressions. This
kind of inlining can also become very costly in terms of calculations, redoing
the same calculations each time a name is reused.
Steps to Reproduce:
Another simpler (fewer expressions) reproducer:
1. Define a named expression data = 1+2+3+4+...+2048
2. Define a second expression double = data+data
3. Display both in the spreadsheet (named expression may need to be touched
again if added at the same time and it shows "#NAME?")
4. Modify double = data+data+0
Actual Results:
Err:512 (might need a hard recalculation to show up)
Expected Results:
The actual value: 4196352
Reproducible: Always
User Profile Reset: No
Additional Info:
Additional Info:
Version: 26.2.4.2 (X86_64)
Build ID: 620(Build:2)
CPU threads: 8; OS: Linux 6.19; UI render: default; VCL: x11
Locale: fr-FR (fr_FR.UTF-8); UI: en-US
Debian package version: 4:26.2.3.2-2
Calc: threaded
--
You are receiving this mail because:
You are the assignee for the bug.