Open
Bug 535623
Opened 15 years ago
Updated 2 years ago
Improve hunspell's FileMgr implementation to reduce the I/O cost
Categories
(Core :: Spelling checker, defect)
Core
Spelling checker
Tracking
()
NEW
People
(Reporter: ehsan.akhgari, Unassigned)
References
(Blocks 1 open bug)
Details
(Keywords: perf, Whiteboard: [ts][Snappy:P3])
Attachments
(1 file)
2.78 KB,
patch
|
Details | Diff | Splinter Review |
hunspell is really dumb in the way it reads files, it just fopen's the files and reads from them in a fgets loop. This patch changes that behavior to read the entire file into a memory buffer and return line chunks to the callers from that buffer. I tried to get smart and avoid strcpy as much as I could, so I'm returning lines from inside the buffer. This can probably be further improved, but I'm curious how much improvement it could show in dtrace logs. I'll try to see if things can be made such that this doesn't happen on startup path at all, though in another bug probably.
Reporter | ||
Comment 1•14 years ago
|
||
Dietrich, could you get someone on the startup team to measure the number of reads for the hunspell dictionary files before and after this patch? If there's an improvement here, I'd like to get this patch landed.
Updated•13 years ago
|
Whiteboard: [ts] → [ts][Snappy]
Updated•13 years ago
|
Whiteboard: [ts][Snappy] → [ts][Snappy:P3]
Reporter | ||
Updated•5 years ago
|
Assignee: ehsan → nobody
Status: ASSIGNED → NEW
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•