Bug 104589 - In certain cases (for for each new symbol insert into a document with the Insert Character dialog) 900kb gets written (configmgr_component_getFactory) (see comment 8)
Summary: In certain cases (for for each new symbol insert into a document with the Ins...
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.0.0.3 release
Hardware: All Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Too-Much-File-Access
  Show dependency treegraph
 
Reported: 2016-12-11 20:02 UTC by Telesto
Modified: 2017-10-03 19:28 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Screencast LO5400 (1.43 MB, video/x-msvideo)
2016-12-14 13:55 UTC, Telesto
Details
Screencast LO4103 (1.51 MB, video/x-msvideo)
2016-12-14 13:57 UTC, Telesto
Details
Proces Monitor Output LO5400 (30.93 KB, application/vnd.ms-excel)
2016-12-14 14:08 UTC, Telesto
Details
SAL_LOG=+TIMESTAMP+INFO,+WARN (39.14 KB, application/vnd.oasis.opendocument.spreadsheet)
2016-12-15 14:59 UTC, Telesto
Details
Example file (9.54 KB, application/vnd.oasis.opendocument.text)
2017-07-22 17:14 UTC, Telesto
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2016-12-11 20:02:09 UTC
Description:
In LibO 4.1.0.4 only 145kb got written (empty document) while minimizing or restoring. With LibO 5.4.0.0 i notice writes of 600 kb (with an empty document).
Is this normal behavior?
 
More generally, I wonder if it is necessary to write something while:
1. Opening a new document (MS Office doesn't) 
2. Minimizing a restoring a window (MS Office doesn't write something)

Steps to Reproduce:
1.Open Writer in for example LibO 4.1.0.4
2.Open a few blank documents
3.Minimize them and take notice of Written bytes
4.Open Writer in for example 5.3.0.0b2
5.Open a few blank documents
6.Minimize them and take notice of Written bytes



Actual Results:  
Every time after minimizing or restoring something gets written to the disk. The bytes written has increased (with factor 4) since 4.1.0.4

Expected Results:
No writes at all or less bytes


Reproducible: Always

User Profile Reset: No

Additional Info:
Test done with
Version: 5.4.0.0.alpha0+
Build ID: 84f2ff67a7e404febf710b1dc7f66d06745c503f
CPU Threads: 4; OS Version: Windows 6.19; UI Render: default; 
TinderBox: Win-x86@42, Branch:master, Time: 2016-12-09_23:20:01
Locale: nl-NL (nl_NL); Calc: CL

Version: 5.0.0.5
Build ID: 1b1a90865e348b492231e1c451437d7a15bb262b
Locale: en-US (nl_NL)

Versie: 4.1.0.4 
Build ID: 89ea49ddacd9aa532507cbf852f2bb22b1ace28


User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0
Comment 1 Buovjaga 2016-12-14 13:26:59 UTC
You could investigate with Process Monitor

https://technet.microsoft.com/en-us/sysinternals/processmonitor

https://askleo.com/i_have_constant_disk_activity_and_i_dont_know_why_how_can_i_tell_what_program_is_doing_it/

I discussed with devs and it might just be Windows swapping to disk more as LibO memory use has increased.
Comment 2 Telesto 2016-12-14 13:55:46 UTC
Created attachment 129632 [details]
Screencast LO5400
Comment 3 Telesto 2016-12-14 13:57:01 UTC
Created attachment 129633 [details]
Screencast LO4103
Comment 4 Telesto 2016-12-14 14:08:19 UTC
Created attachment 129634 [details]
Proces Monitor Output LO5400

Process Monitor Output for minimizing/restoring a few times with LO5400
Comment 5 Telesto 2016-12-15 14:59:51 UTC
Created attachment 129674 [details]
SAL_LOG=+TIMESTAMP+INFO,+WARN

SAL_LOG while minimizing and restoring a few times
Version: 5.4.0.0.alpha0+
Build ID: d538d3d84172a74dfe97d59a6d3daf9a45459cab
CPU Threads: 4; OS Version: Windows 6.19; UI Render: default; 
TinderBox: Win-x86@39, Branch:master, Time: 2016-12-14_00:28:59
Locale: nl-NL (nl_NL); Calc: CL
Comment 6 Buovjaga 2016-12-15 15:17:12 UTC
(In reply to Telesto from comment #5)
> Created attachment 129674 [details]
> SAL_LOG=+TIMESTAMP+INFO,+WARN
> 
> SAL_LOG while minimizing and restoring a few times

Btw. you can output to a file from cygwin:

mycommand > sal_log_output.txt 2>&1

This saves both the stderr and stdout output to the same file.
Comment 7 Telesto 2017-07-08 08:43:52 UTC
Another way to reproduce:
1. Open Writer
2. Open the Insert Character dialog
3. Double click on the a character (inserting it). A temp file gets created every time when inserting a symbol

sal3.dll	osl_writeSocket + 0x7e
sal3.dll	osl_createTempFile + 0xc8
configmgrlo.dll	configmgr_component_getFactory + 0x10335
configmgrlo.dll	configmgrlo.dll + 0x3f573
salhelper3MSC.dll	salhelper::Thread::run + 0x48
salhelper3MSC.dll	salhelper::Thread::run + 0x63d
sal3.dll	osl_getTempDirURL + 0x2f8
ucrtbase.DLL	crt_at_quick_exit + 0x104
KERNEL32.DLL	BaseThreadInitThunk + 0xe
ntdll.dll	RtlInitializeExceptionChain + 0x85
ntdll.dll	RtlInitializeExceptionChain + 0x58
Comment 8 Telesto 2017-07-17 19:05:08 UTC
Variant 1
1. Open Writer
2. Launch Process Monitor. Add two filters:
* Process Name is soffice.bin
* Path contains \user\
3. Add a table
4. Remove a table row

Temp file is writing when adding the table and also when removing the table.
Repro with:
LibreOffice 3.5.7.2 

but not with
LibreOffice 3.3.0 
OOO330m19 (Build:6)
tag libreoffice-3.3.0.4

-----------------------------
Variant 2
1.Open Writer 
2. Launch Process Monitor. Add two filters:
* Process Name is soffice.bin
* Path contains \user\
3.Open a few blank documents
4.Minimize them and take notice of Written bytes

Temp write when minimizing
LibreOffice 3.5.7.2 
Build ID: 3215f89-f603614-ab984f2-7348103-1225a5b

Nothing is written with:
LibreOffice 3.3.0 
OOO330m19 (Build:6)
tag libreoffice-3.3.0.4
---------------------------------
Variant 3
1. Open Writer
2. Launch Process Monitor. Add two filters:
* Process Name is soffice.bin
* Path contains \user\
3. Open the Insert Character dialog
4. Double click on the a character (inserting it). A temp file gets created every time when inserting a symbol

also reproducible with
LibreOffice 3.3.0 
OOO330m19 (Build:6)
tag libreoffice-3.3.0.4
Comment 9 Telesto 2017-07-22 17:14:18 UTC
Created attachment 134783 [details]
Example file

The amount of data written has dropped from 900 kb to 120 kb ;-)
Version: 6.0.0.0.alpha0+
Build ID: a9588baca8137f51e2ca72e40b1f448b0e1885d1
CPU threads: 4; OS: Windows 6.19; UI render: default; 
TinderBox: Win-x86@42, Branch:master, Time: 2017-07-21_02:58:26
Locale: nl-NL (nl_NL); Calc: CL

Another way to reproduce
1. Open the attached document
2. Launch Process Monitor. Add two filters:
* Process Name is soffice.bin
* Path contains \user\
3. Press Shift + Right arrow (->) in Writer -> Notice the creating of a temp file  (102.3 KB will be written)
Comment 10 Buovjaga 2017-07-22 17:23:24 UTC
(In reply to Telesto from comment #9)
> Created attachment 134783 [details]
> Example file
> 
> The amount of data written has dropped from 900 kb to 120 kb ;-)

Perhaps the change is due to the GSoC work so far? https://cgit.freedesktop.org/libreoffice/core/log/?qt=author&q=akshay+deep

Now you confirmed the situation is actually better than with 4.1.

Adding Akshay to CC in case he wants to investigate or comment on the meaning of the disk writing operation.