This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 50085 - [perf] Measure, compare and use mmaped files for data storage that currently occupies heap size
Summary: [perf] Measure, compare and use mmaped files for data storage that currently ...
Status: RESOLVED WONTFIX
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 4.x
Hardware: PC Linux
: P3 blocker (vote)
Assignee: Jaroslav Tulach
URL:
Keywords: PERFORMANCE
Depends on:
Blocks: 44492
  Show dependency tree
 
Reported: 2004-10-07 12:20 UTC by Jaroslav Tulach
Modified: 2007-09-26 09:14 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Acode for reading current .cdx format and simulate potential mmaped trie format for different cell layouts (11.39 KB, text/plain)
2004-11-18 13:37 UTC, Petr Nejedly
Details
This patch replaces random access files by mmaps in FileCache. (1.42 KB, patch)
2004-12-07 09:48 UTC, Daniel Prusa
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jaroslav Tulach 2004-10-07 12:20:23 UTC
Instead of keeping objects in memory the data
should be stored in memory mapped file, which
would be managed by the OS, could be paged out
from memory and even if in memory, it would not be
scanned by garbage collector.

A sample infrastructure with the potential to
replace half of the ClassIndex while occupying
constant amount of heap for arbitrary number of
name prefixes is available in issue 48862.
Comment 1 Jaroslav Tulach 2004-10-07 12:21:48 UTC
Advice for now, very likely request for promotion e.
Comment 2 Martin Matula 2004-10-07 12:33:55 UTC
IMO this should be either a task (given the summary), or a P3 defect.
Since it is an "advice" for now, it should not need to be waived for 4.0.
Comment 3 Petr Nejedly 2004-11-11 10:35:36 UTC
Note: By using mmap instead of RandomAccessFile, you also save a file
descriptor (at least on linux), so you won't run out of them on large
number of opened projects (like nbbuild/misc).
Comment 4 Petr Nejedly 2004-11-18 13:37:46 UTC
Created attachment 18951 [details]
Acode for reading current .cdx format and simulate potential mmaped trie format for different cell layouts
Comment 5 Petr Nejedly 2004-11-18 13:39:09 UTC
Please remove the last three imports before using, I forgot to....
Comment 6 Jaroslav Tulach 2004-11-19 09:49:47 UTC
According to 
http://openide.netbeans.org/tutorial/reviews/opinions_44492.html
this issue is TCR, definitively for promotion E.
Comment 7 Daniel Prusa 2004-12-07 09:48:47 UTC
Created attachment 19168 [details]
This patch replaces random access files by mmaps in FileCache.
Comment 8 Martin Matula 2005-01-20 09:43:57 UTC
We have prototyped usage of java.nio in the b-tree and after
measurements we decided to not use the java.nio there for now.
We have also agreed to build an SPI for plugging different storage
into the ClassIndex. We did it.
Given this, for now - after agreement with Jarda - we are lowering the
priority of this issue to P3.
Jarda will try to implement the ClassIndex SPI using java.nio.
Comment 9 Jan Becicka 2005-02-25 14:48:25 UTC
Jardo? Do you plan to implement ClassIndex SPI?
Comment 10 Jaroslav Tulach 2005-02-25 15:16:12 UTC
I still wish to. I cannot promise any date however.
Comment 11 Jaroslav Tulach 2005-07-07 15:00:09 UTC
I have feeling that I am not going to work on this in near future. Thanks guys 
for all the measurements you did. 
 
If anyone anytime is about to try then please know that it is necessary to 
implement interface  
ClassIndexStorage and then provide own impl in constructor of  
ClassIndexu instead of "storage = new CISImpl(file);" put own "CISImpl". 
 
Comment 12 Quality Engineering 2007-09-20 10:09:29 UTC
Reorganization of java component