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 68750 - XML processing slows down palette init
Summary: XML processing slows down palette init
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Palette (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: Stanislav Aubrecht
URL:
Keywords: PERFORMANCE
Depends on:
Blocks: 90211
  Show dependency tree
 
Reported: 2005-11-15 16:46 UTC by _ rkubacki
Modified: 2008-12-22 10:55 UTC (History)
2 users (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 2005-11-15 16:46:22 UTC
daily build 200511141900, JDK 1.5.0u5

displaying of palette is one of most visible task in profiler when profiling
open of Form/HTML/JSP.

One of possible improvements is use non-validating parser and avoid resolving of
entities (do not have to read DTD). This is what we do on many places in the IDE.
Comment 1 Libor Kotouc 2005-11-15 17:31:46 UTC
I am afraid that we cannot use this approach here bcs we plan to allow user to
define own palette items. Thus we need a validation.
Entity resolver...I am not sure about avoiding because if I had a reference to
DTD and no entity resolver defined NB were trying to connect to URL in DTD
reference.

Any suggestions?
Comment 2 _ rkubacki 2005-11-15 17:56:54 UTC
Do you mean user will edit XML file somewhere in the userdir or instalation dir?
I hope you don't. If the IDE creates such a file for user's item it should be
valid anyway.

re entity resolver: I mean the trick used for example in PersistenceManager in
core/windows. If you do not validate and do not define special entities you can
provide an empty content instead of DTD to make the processing faster.
Comment 3 _ rkubacki 2005-12-14 12:35:03 UTC
It is not only XML validating and entity resolving but also the overhead related
to processing itself.

We have to create a parser for every item in the palette and this is not quite
cheap as it queries system class loader for
org.netbeans.core.startup.SAXFactoryImpl
com.sun.org.apache.xerces.internal.parsers.XIncludeAwareParserConfiguration
com.sun.org.apache.xerces.internal.impl.dv.dtd.DTDDVFactoryImpl every time and
creates/configures the parser.
Comment 4 Stanislav Aubrecht 2008-06-18 15:43:47 UTC
fixed - added caching of xml parser

838d2ccf817d