Bug 150837 - Reading index header is not buffered
Summary: Reading index header is not buffered
Status: VERIFIED DUPLICATE of bug 171653
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 3.3 M6   Edit
Assignee: Frederic Fusier CLA
QA Contact:
URL:
Whiteboard:
Keywords: performance
Depends on:
Blocks:
 
Reported: 2006-07-17 13:24 EDT by John Arthorne CLA
Modified: 2007-03-20 09:12 EDT (History)
1 user (show)

See Also:


Attachments
filemon trace output (94.34 KB, text/html)
2006-07-17 13:24 EDT, John Arthorne CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description John Arthorne CLA 2006-07-17 13:24:23 EDT
Build: Eclipse 3.2

I am doing analysis of Eclipse startup using a tool called "FileMon". This tool hooks into the win32 API and records actual file system accesses.  I see from the filemon trace that the JDT index files have a large number of unbufferred reads occuring. I will attach a filemon trace file that shows each file system access for a particular JDT index file.
Comment 1 John Arthorne CLA 2006-07-17 13:24:47 EDT
Created attachment 46381 [details]
filemon trace output
Comment 2 John Arthorne CLA 2006-07-17 13:30:50 EDT
From a quick look at the source, I think this may be happening in DiskIndex.readHeaderInfo.  Since it uses RandomAccessFile, it is reading using unbuffered input. Most damaging is the Util.readUTF() method that is reading UTF strings one byte at a time.  With unbuffered input this is quite expensive (the disk will likely have a cache, but still costs an OS call, etc). One solution is to use something like BufferedRandomInputStream in org.eclipse.equinox.registry to get buffered random access to this file.
Comment 3 Frederic Fusier CLA 2007-03-16 06:26:27 EDT
Bug 171653 should have been set as duplicate of this one. We missed it while working on it...


*** This bug has been marked as a duplicate of bug 171653 ***
Comment 4 Olivier Thomann CLA 2007-03-20 09:12:49 EDT
Verified for 3.3 M6 using build I20070320-0010