[scilab-Users] graphics speed from 4.1.2 to 5.0.2 and virtual graphical window
marc.fuentes at inrialpes.fr
marc.fuentes at inrialpes.fr
Wed Oct 1 17:51:48 CEST 2008
On 12:29 Wed 01 Oct , Geraldo Netto wrote:
> Hi Guys,
>
> It seems a java bottleneck
> i mean this performance issue that comes from java architecture
>
> while i'm pretty newbie to ensure this
> i guess it can be improved by changing
> the swing to another 'widget toolkit' like swt[1]
> which uses a mix of java and native api to draw the interfaces....
>
> [1] http://en.wikipedia.org/wiki/Standard_Widget_Toolkit
>
> See Ya
> (and i hope it helps :))
>
> Geraldo
> S?o Paulo, Brasil, -3gmt
> site: http://exdev.sf.net/
> msn: geraldo_boca_at_hotmail.com
> skype: geraldo-netto
> icq: 145-061-456
>
> 2008/10/1 bagvian <bagvian at gmail.com>:
> > Hi there,
> >
> > My problem is the following: I want to generate many plots and export
> > them as, say gif file to see them later.
> > I wrote an example that does such a task:
> >
> > for i=0:9
> > // Create a graphival window
> > scf(i);
> > f=gcf()
> > f.figure_size= [1600,1200];
> >
> > // Plot a first random function with using a couple of graphical options
> > subplot(2,1,1); plot(rand(1,100),'b-x');
> > a=gca();
> > a.tight_limits="on";
> > legends(["rand0"],[2],opt="ur");
> > xgrid(1);
> >
> > // Plot a second random function
> > subplot(2,1,2); plot(rand(1,100),'b-x');
> > a=gca();
> > a.tight_limits="on";
> > legends(["rand1"],[2],opt="ur");
> > xgrid(1);
> >
> > // Export plot into gif and delete the current graphical window
> > xs2gif(i,sprintf('image_%d.gif',i));
> > xdel(i);
> > end
> >
> > This program runs within 75s with Scilab 5.0.2 on my computer.
> > Now, it runs within only 5s with Scilab 4.1.2 on the same computer.
> >
> > Is there an explanation for this lack of performance reached by 5.0.2?
> > Is there a way to improve the function above to get a fast result with 5.0.2?
> >
> > The best way would be not to create a visible graphical window but
> > create a "virtual graphical window" instead that cannot be seen but
> > that can be used to export graphics.
> > Any idea about how to do such a thing?
> >
> > Thanks a lot in advance.
> > Cheers, B.
> >
>
Indeed, scilab wants to mimick matlab using java, and as a consequence
it becomes very slow. In matlab using -nojvm enables matlab to go faster
but does not prevent plotting graphics.
But with scilab 5.0.2 , disabling java support at compile time prevents you to plot
graphics(you must compile with option "--without-gui")
The solution : go on with scilab-4.1.2!
More information about the users
mailing list