Preview getting slower and slower

Found a bug? Post information about it here so we can fix it!

Moderator: Moderators

Post Reply
User avatar
rrTea
Posts: 475
Joined: Sat Feb 15, 2014 9:54 am

Preview getting slower and slower

Post by rrTea »

On first activation the Preview window works normally, but after that it hangs on the end of OnLoaded longer and longer, even if the program is "empty".

Just for illustration, I'm ataching the video. Here is the test code too:

Code: Select all

<?xml version="1.0" encoding="iso-8859-1" ?>
<ZApplication Name="Prg" Comment="waiter" Caption="SuperHero" ClearColor="0.4 0.85 1 1" AmbientLightColor="0.498 0.498 0.498 1" FrameRateStyle="2" FixedFrameRate="60" Camera="Projection" LightPosition="0 0 5" ViewportRatio="2" NoSound="1" PreviewClearColor="0.7529 0.7529 0.7529 1">
  <OnLoaded>
    <ZExpression>
      <Expression>
<![CDATA[trace
("OnLoaded  = COMPLETED !");]]>
      </Expression>
    </ZExpression>
  </OnLoaded>
  <OnUpdate>
    <ZExpression>
      <Expression>
<![CDATA[trace (intToStr(rnd()*100));

//Just to make sure it is
//updating...]]>
      </Expression>
    </ZExpression>
  </OnUpdate>
  <OnRender>
    <UseMaterial Material="ColorMono"/>
    <RenderMesh Mesh="Cube"/>
  </OnRender>
  <Content>
    <Camera Name="Projection" Kind="1" Position="0 -7.2654 10" Rotation="-0.1 0 0" OrthoZoom="4"/>
    <Mesh Name="Cube">
      <Producers>
        <MeshBox/>
      </Producers>
    </Mesh>
    <Material Name="ColorMono" Comment="Default: white, shaded"/>
  </Content>
</ZApplication>
Attachments
Capture-137.avi
Note also the &quot;flashing&quot; effect of the console...
(1.53 MiB) Downloaded 490 times
User avatar
VilleK
Site Admin
Posts: 2274
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Post by VilleK »

Hi,

The problem appears because I recently tried to make the preview frame rate respect App.FrameRate setting. Previously it would always be around 30fps in preview regardless of setting. I've fixed a bug related to this now, please download beta and try again.

Regards,

Ville
User avatar
rrTea
Posts: 475
Joined: Sat Feb 15, 2014 9:54 am

Post by rrTea »

Hi,

Great! It works perfectly now :)

Thanks!
Ray
Post Reply