Issue 118546 - CPU 100% on switched off AutoCalculate with Conditional Formatting on date values
Summary: CPU 100% on switched off AutoCalculate with Conditional Formatting on date va...
Alias: None
Product: Calc
Classification: Application
Component: ui (show other issues)
Version: 3.4.0 Beta (OOo)
Hardware: All All
: P5 (lowest) Critical (vote)
Target Milestone: ---
Assignee: Wang Lei
QA Contact:
Depends on:
Reported: 2011-10-25 10:26 UTC by Zdenko Turcan
Modified: 2012-08-29 09:25 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---

reproduced problem in sample file (10.19 KB, application/vnd.oasis.opendocument.spreadsheet)
2011-10-25 10:26 UTC, Zdenko Turcan
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description Zdenko Turcan 2011-10-25 10:26:49 UTC
Created attachment 76926 [details]
reproduced problem in sample file

Problem description: When spreadsheet on foreground with switched off AutoCalculate + there are some cells with Conditional Formatting and date values, very high CPU load can be seen everlasting.

For simplicity I've created simple scenario (in reality I have complex document and conditional formatting is only in the first column).

Steps to reproduce:
1. Create new Calc / Spreadsheet document
2. set A1 =TODAY()
3. set B1 .. K1 = A1+1 .. J1+1
4. copy row 1 to rows 2 ..40
5. set on this (A1..K40) cells the conditional formatting:
  [x] Condition 1: Cell value is equal to TODAY()
6. set Tools / Cell Content / [ ] AutoCalculate

Current behavior: very high CPU load: 30-100% without any user input

Expected behavior: minimal CPU load (0-1%)

Platform (if different from the browser): probably on all platforms (at least on linux and windows). this bug is also in older versions (at least 2 years ago)
Comment 1 Marcus 2011-10-25 16:03:25 UTC
Confirmed on Linux and OOo 3.3
Comment 2 Wang Lei 2012-03-08 06:32:21 UTC
Confirm it in AOO3.4 rev 1296433. 
I am investigating it.
Comment 3 Wang Lei 2012-03-16 07:11:10 UTC
When timer invoke Paint, it will call ScConditionEntry::Interpret(). If Auto Calculate is disable, SC will not calc formula which make the temp formula always dirty. The dirty state will make ScConditionEntry::DataChanged() be invoked, which will call ScDocument::RepaintRange(). This will make some range invalid and to be painted in next timer invoke Paint.

So there is always something to be repainted.
Comment 4 Wang Lei 2012-03-16 08:56:23 UTC
If the auto calculate is disable, the result of the formula in the condition entry will not be updated. So it does not need to make range dirty to update the range.

Fix this issue with revision 1301380
Comment 5 binguo 2012-08-29 09:25:00 UTC
Verified on Aoo_Trunk_20120828.1800, it can not repro, it is fixed. so close it.