https://bugs.freedesktop.org/show_bug.cgi?id=54376
Bug #: 54376
Summary: reads files one byte at a time
Classification: Unclassified
Product: LibreOffice
Version: 3.6.1.1 rc
Platform: Other
OS/Version: All
Status: UNCONFIRMED
Severity: normal
Priority: medium
Component: Libreoffice
AssignedTo: [email protected]
ReportedBy: [email protected]
I was trying to see why LibreOffice was taking a long time starting. An strace
shows an awful lot of read() system calls for just one byte. That makes reading
the file *much* slower: use buffered I/O. Just use libc's fopen/fread instead
of the OS's syscalls open/read, and even no need to change program logic if it
wants to treat the characters one by one. (If it calls fread on several
characters at once, it will be even faster...)
Here's one specific example I caught. That's reading the file
swext/mediawiki/help/wikiformats.xhp
Someone knows which function/file/part of LibreOffice reads that file?
read(30, "n", 1) = 1
read(30, " ", 1) = 1
read(30, "W", 1) = 1
read(30, "i", 1) = 1
read(30, "k", 1) = 1
read(30, "i", 1) = 1
read(30, " ", 1) = 1
read(30, "a", 1) = 1
read(30, "r", 1) = 1
read(30, "t", 1) = 1
read(30, "i", 1) = 1
read(30, "c", 1) = 1
read(30, "l", 1) = 1
read(30, "e", 1) = 1
read(30, "s", 1) = 1
read(30, ".", 1) = 1
read(30, " ", 1) = 1
read(30, "N", 1) = 1
read(30, "e", 1) = 1
read(30, "v", 1) = 1
read(30, "e", 1) = 1
read(30, "r", 1) = 1
read(30, "t", 1) = 1
read(30, "h", 1) = 1
read(30, "e", 1) = 1
read(30, "l", 1) = 1
read(30, "e", 1) = 1
read(30, "s", 1) = 1
read(30, "s", 1) = 1
read(30, ",", 1) = 1
read(30, " ", 1) = 1
read(30, "t", 1) = 1
read(30, "e", 1) = 1
read(30, "x", 1) = 1
read(30, "t", 1) = 1
read(30, " ", 1) = 1
read(30, "a", 1) = 1
read(30, "l", 1) = 1
read(30, "i", 1) = 1
read(30, "g", 1) = 1
read(30, "n", 1) = 1
read(30, "m", 1) = 1
read(30, "e", 1) = 1
read(30, "n", 1) = 1
read(30, "t", 1) = 1
read(30, " ", 1) = 1
read(30, "i", 1) = 1
--
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs