<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://jogamp.org/bugzilla/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.2"
          urlbase="https://jogamp.org/bugzilla/"
          
          maintainer="sgothel@jausoft.com"
>

    <bug>
          <bug_id>891</bug_id>
          
          <creation_ts>2013-11-05 08:59:11 +0100</creation_ts>
          <short_desc>Enhance GLCapabilities-Query from native Configuration (EGL, GLX, WGL) / General Performance</short_desc>
          <delta_ts>2013-11-17 18:31:25 +0100</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>3</classification_id>
          <classification>JogAmp</classification>
          <product>Jogl</product>
          <component>core</component>
          <version>2</version>
          <rep_platform>All</rep_platform>
          <op_sys>all</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>---</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>888</blocked>
    
    <blocked>905</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Sven Gothel">sgothel</reporter>
          <assigned_to name="Sven Gothel">sgothel</assigned_to>
          <cc>sgothel</cc>
          
          <cf_type>---</cf_type>
          <cf_scm_refs>613e33ee8ffc1f2b9c5db1e1b5bb5253a159ed6d
cf1163fc88976e7087d3a17524a49139e35a4708
6395670886513796b747e7aaef2ebfbbcda7b07e
144b9ef5a433b2a93f5503b1c935c8f7ec61a0de</cf_scm_refs>
          <cf_workaround>---</cf_workaround>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>3268</commentid>
    <comment_count>0</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2013-11-05 08:59:11 +0100</bug_when>
    <thetext>Querying GLCapabilities from native configuration currently explodes into 
multiple xxxGetConfig(..) JNI calls, which utilize NIO buffers.

Using a bulk method will enhance performance.

Further more, add a &apos;fast path&apos; where we use the recommended native config
as chosen by xxxChooseConfig(..), i.e. only create the chosen GLCapabilities which is being used,
instead of querying all GLCapabilities! This will speed-up the process dramatically.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>3269</commentid>
    <comment_count>1</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2013-11-05 08:59:58 +0100</bug_when>
    <thetext>613e33ee8ffc1f2b9c5db1e1b5bb5253a159ed6d

    X11GLXGraphicsConfiguration.GLXFBConfig2GLCapabilities(..) ran over all FB configs and for each it grabbed
    native config values separately. Fetching them in bulk mode saves around 7% of this function&apos;s cost.
    
    Also reuse XRenderPictFormat instance for &apos;XRenderDirectFormat XRenderFindVisualFormat(..)&apos; call,
    saving a few NIO creation cycles w/ StructAccessor.
    
    Biggest savior is X11GLXGraphicsConfigurationFactory.chooseGraphicsConfigurationFBConfig()&apos;s
    fast path w/o chooser and usable 1st FBConfig. Here we only issue &apos;GLXFBConfig2GLCapabilities(..)&apos;
    on the first valid entry.
    
    Test w/ 50 X11GLXGraphicsConfigurationFactory.chooseGraphicsConfigurationFBConfig() invocations:
      - pre change:  1.708 ms
      - post change:   650 ms
    
    Time is no spent almost solely on native glXChooseFBConfig (546ms).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>3270</commentid>
    <comment_count>2</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2013-11-05 11:05:34 +0100</bug_when>
    <thetext>cf1163fc88976e7087d3a17524a49139e35a4708

Bug 888 / Bug 891 - Enhance GLCapabilities-Query: Apply changes of commit 613e33ee8ffc1f2b9c5db1e1b5bb5253a159ed6d to EGL and WGL.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>3291</commentid>
    <comment_count>3</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2013-11-07 13:39:56 +0100</bug_when>
    <thetext>6395670886513796b747e7aaef2ebfbbcda7b07e:
  WindowsWGLGraphicsConfigurationFactory: 
      Fix chosenPFDID -&gt; recommendedIndex (!skipCapsChooser mode)

      Regression of commit cf1163fc88976e7087d3a17524a49139e35a4708:
      Commit dropped seeking recommendedIndex of chosenPFDID within cleaned-up availableCaps
      when in !skipCapsChooser mode.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>3292</commentid>
    <comment_count>4</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2013-11-07 13:40:17 +0100</bug_when>
    <thetext>144b9ef5a433b2a93f5503b1c935c8f7ec61a0de
  GLJPanel: Don&apos;t ctor DefaultGLCapabilitiesChooser() if null chooser is passed, this allows native GLCaps/config query to follow fast-path</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>