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 52013 - Bad contract between MdrStorage and BtreeDatabase
Summary: Bad contract between MdrStorage and BtreeDatabase
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 4.x
Hardware: PC All
: P4 blocker (vote)
Assignee: issues@java
URL:
Keywords: PERFORMANCE
Depends on:
Blocks: 51714
  Show dependency tree
 
Reported: 2004-12-02 13:23 UTC by _ rkubacki
Modified: 2004-12-09 09:46 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description _ rkubacki 2004-12-02 13:23:13 UTC
MdrStorage uses SinglevaluedIndex as a contract
how to access underlying database.
SinglevaluedIndex use key of type Object but our
implementation of SinglevaluedIndex is a
BtreeDatabase where we expect MOFID and it means
that although we already have a MOFID the typical
call tree looks like:

MdrStorage.getObject(MOFID)
  -> BtreeDatabase.getIfExists(Object)
    -> BtreeDatabase.makeMOFID(Object)
    -> BtreeDatabase.getIfExists(MOFID)

The result is thousands of method calls for each
reparse / for each CC request. Tens of thousands
during start.
Comment 1 Daniel Prusa 2004-12-08 15:40:32 UTC
Checking in BtreeDatabase.java;
/cvs/mdr/src/org/netbeans/mdr/persistence/btreeimpl/btreestorage/BtreeDatabase.java,v
 <--  BtreeDatabase.java
new revision: 1.26; previous revision: 1.25
Comment 2 Petr Nejedly 2004-12-08 16:13:18 UTC
If you're bounded by the Index interface, why don't you delete the
MOFID variants of the method and place the body into the Object
variant? hotspot may (or may not, the class is not even final) inline
it but I won't be so sure and there is very little usage of the MOFID
variant...
Comment 3 Daniel Prusa 2004-12-09 09:46:48 UTC
Done.
Checking in BtreeDatabase.java;
/cvs/mdr/src/org/netbeans/mdr/persistence/btreeimpl/btreestorage/BtreeDatabase.java,v
 <--  BtreeDatabase.java
new revision: 1.28; previous revision: 1.27