I wrote a custom formula in Python (for example, the name Formula 1 ) and added it as an extension of LibreOfficeCalc.
There can be a lot of such formulas on the sheet and with different parameters.
Is it possible to somehow force LibreOffice Calc to execute these formulas in any way now I have sequentially, but in parallel?
(AFAIK ) but NO!
How are you doing this sequentially now? Is your proceeding automated or interactive?
Are there reasons to avoid a full (hard) recalculation of the spreadsheet document?
If so:
A very raw solution implemented as a nasty Basic macro you find here:)
As any(?) program it works sequentially, of course.
@Lupp: there was a translation problem; OP meant that he needs the calculation to perform in parallel, not sequentially (as it works now: all formulas having custom functions are calculates one after another, regardless of calculation settings - be it OpenCL, or multi-threaded).
Thanks.
I only have a faint idea of parallel processing in the now correct sense. If I had undesrtood the question this way, I hadn’t tried an answer.
That’s exactly what I wanted to say. I apologize for my English.
Sort of… if implemented as an Add-In function that returns a sheet::XVolatileResult, the call instances with their arguments could be remembered and an interim result (e.g. “not ready” value) be returned immediately. The Calc calls would still be sequentially, but the Add-In could gather all calls and implement any scheduler to parallelize its processing, and whenever ready notify the corresponding Calc sheet::XResultListener that a new result is available.
See also LibreOffice Developer's Guide: Chapter 8 - Spreadsheet Documents - The Document Foundation Wiki
I need to parallelize execution, not post-processing, after sequential execution.
What I suggested is almost what you want. It would be triggering the function calls sequentially but not actually executing the payload. For that, you’d have take your own measures to thread it.