<?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>1490</bug_id>
          
          <creation_ts>2024-01-22 03:08:55 +0100</creation_ts>
          <short_desc>GraphUI Group: Resolve Performance Issues with Shape Mv Transform -&gt; PMVMatrix4f; Group/Scene&apos;s temp sorted arrays</short_desc>
          <delta_ts>2024-01-31 11:41:55 +0100</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>3</classification_id>
          <classification>JogAmp</classification>
          <product>GraphUI</product>
          <component>Core</component>
          <version>2.6.0</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>P1</priority>
          <bug_severity>critical</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>805</blocked>
    
    <blocked>1495</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Sven Gothel">sgothel</reporter>
          <assigned_to name="Sven Gothel">sgothel</assigned_to>
          
          
          <cf_type>DEFECT</cf_type>
          <cf_scm_refs>a883f3e2e1563736df32573141fd5119f0678c92
bf096870c73898963558bef5c9d75760f9f76290
daf9ae20ebc45c851bc3b8384f4cee3cded8d9dc</cf_scm_refs>
          <cf_workaround>---</cf_workaround>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>7051</commentid>
    <comment_count>0</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2024-01-22 03:08:55 +0100</bug_when>
    <thetext>Shape.setTransformMv() is called for each renderer frame and for each shape,
involving 6 Matrix4f.mul() and set*() operations.

Since mutation of shape&apos;s position, rotation or scale is less frequent
than rendering one frame (for all shapes),
it is more efficient to maintain a local Matrix4f and update it 
on such single mutations.

Rendering then only needs to perform one Matrix4f.mul() operation
using this internal matrix.

Also change name from setTransformMv(PMVMatrix4f) to transformMvTo(PMVMatrix4f),
as its name might be misleading.

+++

Group/Scene&apos;s uses temp arrays for Z oder sorting,
which should be maintained locally to avoid too many temp object creations.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>7053</commentid>
    <comment_count>1</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2024-01-22 05:55:05 +0100</bug_when>
    <thetext>commmit a883f3e2e1563736df32573141fd5119f0678c92

Modified Shape.setTransformMv() as described.

Renamed Shape.setTransformMv(PMVMatrix4f) to applyMatToMv(PMVMatrix4f)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>7055</commentid>
    <comment_count>2</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2024-01-22 06:03:00 +0100</bug_when>
    <thetext>commit bf096870c73898963558bef5c9d75760f9f76290
Bug 1490 - GraphUI Performance: Group/Scene: Use temp sorted arrays</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>7057</commentid>
    <comment_count>3</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2024-01-22 06:38:54 +0100</bug_when>
    <thetext>commit daf9ae20ebc45c851bc3b8384f4cee3cded8d9dc (HEAD -&gt; master)

Add missing rename Shape.transformMvTo() -&gt; applyMatToMv(), an transformMvTo() was an intermediate rename (oops)</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>