<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Hello Antoine,</p>
    <p>Exporting in headless mode (all drivers but the default "Rec") is
      fundamentally different from the default "Rec" mode where graphics
      are actually rendered on screen on a joGL Canvas. In this case
      there is virtually no overhead when exporting this Canvas to a
      bitmap image format (png,jpeg,gif,...). In headless mode the
      rendering cannot use joGL and there is the same overhead as when
      you try to export a figure to a vectorial format (svg,pdf,eps) :</p>
    <p>nx=4000;<br>
      ny=300;<br>
      nc=100;<br>
      <br>
      x=1:nx;<br>
      y=[1:ny].';<br>
      z=(y*x);<br>
      <br>
      driver Rec<br>
      h=scf();<br>
      h.color_map=hotcolormap(nc);<br>
      Sgrayplot(x,y,z.');<br>
      xs2pdf(h,"screen.pdf")<br>
    </p>
    <p>at line    13 of executed file
      /Users/mottelet/Desktop/xend_test.sce<br>
      <br>
      xs2pdf: Unable to create export file, not enough memory.
      Decreasing the number of elements or the size of the figure should
      fix this error.<br>
    </p>
    <p>S.<br>
    </p>
    <div class="moz-cite-prefix">Le 03/12/2020 à 09:48, Antoine
      Monmayrant a écrit :<br>
    </div>
    <blockquote type="cite"
      cite="mid:cee70853-2f4e-b1be-92c8-fd3708d4747b@laas.fr">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <p>Hello all,</p>
      In these days of remote working, I need to use again scilab in
      headless mode to generate graphics.<br>
      <p>In other words, I connect  in command line only to a remote
        server where scilab is installed and I want it to generate
        graphics using a combination of driver, xinit and xend.</p>
      There seems to be some issues with driver/xinit/xend: huge memory
      overhead and long computation time that makes it impossible to
      generate some plots in headless mode.<br>
      <p>For example, a simple Sgrayplot that takes ~1 second to plot
        and save to a png in normal mode takes more than 200 seconds and
        huge amount of ram in headless mode (see attached test script).<br>
        <br>
        I also have some plots that works without a problem in normal
        mode, but fail in headless mode because of some memory
        limitation:</p>
      <blockquote>
        <p>xend: An error occurred: Unable to create export file, not
          enough memory. Decreasing the number of elements or the size
          of the figure should fix this error.<br>
        </p>
      </blockquote>
      <p>Is there a way to get around these problems?</p>
      <p>Thanks for your help,<br>
      </p>
      <p>Antoine</p>
      <br>
      <p><br>
      </p>
      <p><br>
      </p>
      <p><br>
      </p>
      <br>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:users@lists.scilab.org">users@lists.scilab.org</a>
<a class="moz-txt-link-freetext" href="https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users">https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users</a>
</pre>
    </blockquote>
    <pre class="moz-signature" cols="72">-- 
Stéphane Mottelet
Ingénieur de recherche
EA 4297 Transformations Intégrées de la Matière Renouvelable
Département Génie des Procédés Industriels
Sorbonne Universités - Université de Technologie de Compiègne
CS 60319, 60203 Compiègne cedex
Tel : +33(0)344234688
<a class="moz-txt-link-freetext" href="http://www.utc.fr/~mottelet">http://www.utc.fr/~mottelet</a>
</pre>
  </body>
</html>