<?xml version="1.0"?>
<rss version="0.91">
  <channel>
    <!-- You need to customize this information -->
    <title>The Art of 3D</title>
    <link>http://new.taodyne.com/blog/</link>
    <description>Daily rants about building Tao3D</description>
    <language>en-us</language>
    <docs>http://new.taodyne.com/blog</docs>
    <managingEditor>christophe@taodyne.com</managingEditor>
    <webMaster>christophe@taodyne.com</webMaster>
    <!-- These are just examples. They will be filled in on generation -->
    <pubDate>Fri, 13 Oct 2017 12:56:15 GMT</pubDate>
    <lastBuildDate>Fri, 13 Oct 2017 12:56:15 GMT</lastBuildDate>

    <item>
      <title>&lt;img src="http://christophe.dinechin.orgimages/171013-VariousStages.png" align="center"/&gt;</title>
      <link>http://christophe.dinechin.orgimages/171013-VariousStages.png</link>
      <guid isPermaLink="true">http://christophe.dinechin.orgimages/171013-VariousStages.png</guid>
      <description>&lt;!--Back to measurements--&gt;

Returning to actual recorder measurements, having ruled out the
recorder as a cause for the memory leak, I'm going to use it to
investigate the source of the memory leak.

First measurement illustrates the difference in bandwidth required for
various kinds of content (idle, animation, full-screen movie):
&lt;p align="center"&gt;&lt;a href="http://christophe.dinechin.orgimages/171013-VariousStages.png"&gt;&lt;img src="http://christophe.dinechin.orgimages/171013-VariousStages.png" align="center"/&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;Linux performance&lt;/h3&gt;

Running &lt;tt&gt;spicy&lt;/tt&gt; on Linux, I get a rather interesting behavior. The
Tao3D document I am using for testing is at the end of this page.

# If I run the blinking dot page ("Mostly Harmless"), then VNC and
  Spicy are in exact opposite phases, i.e. I see on VNC a dot when
  there is none on Spice and conversely. Off-by-one frame issue,
  known, but needs to be addressed.

# If I run with the recorder activated, there is a lot of enqueuing
  happening, the queue length goes all the way to 200-300, and that's
  when memory (unsuprisingly) starts ballooning.

# Coincidentally, there is a sudden drop in the delay, which goes to
  0. So I think we may be scheduling frames out of order.

&lt;p align="center"&gt;&lt;a href="http://christophe.dinechin.orgimages/171013-SuddenlyDroppingDelay.png"&gt;&lt;img src="http://christophe.dinechin.orgimages/171013-SuddenlyDroppingDelay.png" align="center"/&gt;&lt;/a&gt;&lt;/p&gt;

Notice how the delay begins at a "normal" 1600 to a much higher value,
and then drops precipitously, at the time when the queue increases.

Performance test looks like this (no sound, Linux screen capture, but
the video on macOS below may explain a bit what you see):

&lt;iframe class="youtube" src="http://christophe.dinechin.orghttps://www.youtube.com/embed/WSHF7GVaQPE" frameborder="0" allowfullscreen&gt;&lt;/iframe&gt;


&lt;h3&gt;macOS performance&lt;/h3&gt;

Running &lt;tt&gt;spicy&lt;/tt&gt; on macOS, I have tons of:

{{{
3197 990.152844] channel-display-gst.c:207:gst_schedule_frame_warning: Rendering too late by 62985 ms (ts: 1488567, mmtime: 1551552), dropping
}}}

Performance test issue and memory on macOS :

&lt;iframe class="youtube" src="http://christophe.dinechin.orghttps://www.youtube.com/embed/tnuSQHIzYjM" frameborder="0" allowfullscreen&gt;&lt;/iframe&gt;


&lt;h3&gt;Tao3D test document&lt;/h3&gt;

Here is the complete Tao3D document I'm using at this point:
{{{
import BlackAndWhiteThemes
import VLCAudioVideo
import Animate


theme "WhiteOnBlack"

picture_slide "Empty void of nothingness",
    false

picture_slide "Mostly Harmless",
    if seconds mod 2 = 0 then
        color "green"
        circle 0, 0, 20

picture_slide "Speed test",
    background_color "#125"
    box 0, 0, 800, 600,
        vertical_align 0.5 + 0.5 * sin time
        align 0.5 + 0.5 * sin (0.3 * time)
        text "Time: " &amp; page_time * 1000
    locally
        color_hsv 20 * time, 0.3, 1, 60%
        rotate_z 6 * page_time
        ellipse_sector 0, 0, 500, 500, 0, 60 * page_time mod 360

picture_slide "Clock",
    background_color_hsv time, 0.4, 0.6
    locally
        color "darkblue"
        dots with 0..59
        dots N -&gt;
            locally
                rotate_z -6 * N
                translate_y 222
                if N mod 5 = 0 then
                    rectangle 10, 10
                else
                    circle 3
    locally
        color "red"
        rotate_z -360 * time
        rectangle 0, 120, 2, 240
    locally
        rotate_z -6 * seconds
        rectangle 0, 60, 5, 120
    locally
        color "darkgrey"
        rotate_z -6 * minutes - 0.1 * seconds
        rectangle 0, 80, 8, 160
    locally
        color "darkgrey"
        rotate_z -30 * hours - 0.5 * minutes
        rectangle 0, 60, 10, 120

picture_slide "Helvetica Clock",
    // Draw in white on a black background, rotate globally with the mouse
    background_color "black"
    color "white"
    light 0
    light_position 300, 300, 1000
    light_specular "white"
    light_ambient "pink"

    rotate_x -120 * mouse_y / window_height
    rotate_y 120 * mouse_x / window_width

    // Font and text alignment
    font "Arial", 300
    align 0.5
    align_vertically 0.5
    extrude_depth 180

    // The size of the boxes used to show each digit
    once
        H := 1.1 * text_height "0"
        W := 1.1 * text_width "0"

    shader_program
        fragment_shader &lt;&lt;
            void main()
            {
                vec4 color = gl_Color;
                color.a *= 1.0 - 8.0 * (gl_FragCoord.z - 0.5);
                gl_FragColor = color;
            }
        &gt;&gt;

    // The primary draw loop
    locally
        Index := 0
        translate_x -2.5*W
        two_digits with hours, minutes, seconds

    // Overlay to highlight the current time
    blend_function "DST_COLOR", "ONE_MINUS_SRC_ALPHA"
    color_hsv 2 * time, 0.3, 0.5, 0.7
    rectangle 0, 0, 6.5*W, H

    // Drawing two digits
    two_digits N:integer -&gt; digit_column with N/10, N mod 10

    // Drawing a single digit column
    digit_column N:integer -&gt;
        locally
            adjust -N, currentY[Index]
            digit with 0..9

        // Move to the next one
        translate_x W
        Index := Index+1

    // Drawing a single digit in a text box
    digit N:integer -&gt;
        text_box 0,0,2*W,2*H,
            render N
        step 1

    // Vertical adjustment - Common case
    adjust TY:real, Y:real -&gt;
        interpolate 0.1, TY, Y
        step Y

    // Vertical adjustment - Initialization case
    adjust TY:real, Other -&gt;
        currentY[Index] := TY
        adjust TY, currentY[Index]

    step R -&gt;
        translate_z -700
        rotate_x 25 * R
        translate_z 700

    // The variables we use
    H -&gt; 15.0
    W -&gt; 15.0
    Index -&gt; 0
    data currentY

picture_slide "Movie - World War Z",
    WWZ -&gt; "/data/video/Movies/Christophe/World War Z (2013).mp4##input-repeat=-1"
    locally
        color "white"
        movie 0, 120, 200%, 200%, WWZ
    on "pageexit",
            movie_drop WWZ

picture_slide "Movie - Lucy",
    LUCY -&gt; "/data/video/Movies/Christophe/Lucy (2014).mp4##input-repeat=-1"
    locally
        color "white"
        movie 0, 120, 200%, 200%, LUCY
    on "pageexit",
            movie_drop LUCY

}}}
      </description>
    </item>
  </channel>
</rss>
