Bug 10697 - Performance - Binary model should not cache the classfile bytes
Summary: Performance - Binary model should not cache the classfile bytes
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P2 normal (vote)
Target Milestone: 2.0 M4   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-03-04 13:06 EST by Philipe Mulet CLA
Modified: 2002-03-08 13:05 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philipe Mulet CLA 2002-03-04 13:06:12 EST
Build 20020226

Once a binary type has been created, the classfile bytes should be released.
Comment 1 Philipe Mulet CLA 2002-03-05 06:14:33 EST
It feels that the ClassFileReader populates anyway all of its structural 
information (field & method) anyway, so the need for the bytes is minimal 
(thrown exceptions ? etc...) why not having a mode for eagerly caching these as 
well. What would the difference be ?

Getting rid of the bytes is probably a big win.
Comment 2 Olivier Thomann CLA 2002-03-06 14:00:47 EST
We need to add  a flag on the class file reader to initialize the whole structure on the creation. The 
bytes are persisted because we need them in order to be able to resolve constant pools entries. The 
class file reader is a lazy reader. It doesn't initialize an object till this object is requested 
(e.g. signature of method info, ...).
Comment 3 Olivier Thomann CLA 2002-03-07 17:27:24 EST
I added new methods to create ClassFileReader which take an extra argument. This argument is used 
to fully initialize all fields inside the class file reader. When this is done, the class file 
reader doesn't keep the bytes around. We need to see if this is a big win in term of memory 
consumption.
Comment 4 Olivier Thomann CLA 2002-03-08 13:04:42 EST
The class file reader now is capable of releasing the bytes once fully 
initialized.
Fixed and released in HEAD.