Bug 972 - Reduce ClassLoader Lookup, i.e. Class.forName(..)
Summary: Reduce ClassLoader Lookup, i.e. Class.forName(..)
Status: RESOLVED FIXED
Alias: None
Product: Jogl
Classification: JogAmp
Component: core (show other bugs)
Version: 2
Hardware: All all
: --- enhancement
Assignee: Sven Gothel
URL:
Depends on:
Blocks:
 
Reported: 2014-02-12 02:09 CET by Sven Gothel
Modified: 2014-02-13 00:59 CET (History)
1 user (show)

See Also:
Type: ---
SCM Refs:
gluegen dfde2a47bfdc2d1ad75c8e1165e27c767803cc3f jogl c5964bf2e3ebd6e05a7d551b033355c21ca9eea9
Workaround: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sven Gothel 2014-02-12 02:09:17 CET
Class.forName(..) may cause a dramatic performance hit in special cases,
i.e. long CLASSPATH or multiple daisy-chained ClassLoader.

Try to cache ClassLoader lookup results or avoid lookup alltogether.
Comment 1 Sven Gothel 2014-02-13 00:59:39 CET
dfde2a47bfdc2d1ad75c8e1165e27c767803cc3f
  Instrument ReflectionUtil's forName(..) usage

c5964bf2e3ebd6e05a7d551b033355c21ca9eea9
    GLProfile, GLContextImpl:
      - ReflectionUtil.DEBUG_STATS_FORNAME: Dump forName stats if set
      - Cache GL*Impl and GL*ProcAddressTable Constructor<?> for GLContextImpl's createInstance(..)
      - Remove off-thread early classloading thread which only adds complications
    
    DisplayImpl:
      - Remove one redundant availability test