|
From: Daniel J S. <dan...@ie...> - 2016-07-19 07:28:35
|
On 07/19/2016 01:29 AM, Daniel J Sebald wrote: > On 07/19/2016 12:04 AM, Jun T. wrote: > >>>> It seems gnuplot uses about 0.5GB of memory for nonlinear3.dem. >> >> qt or wxt uses much smaller amount of memory. >> >> As for the CPU usage, Aquaterm.app uses about 95% of cpu while gnuplot uses 5 to 10% >> (100% means one cpu core is fully used). So it seems gnuplot creates large amount >> of data and send it to Aquaterm.app, while the latter uses large amount of cpu >> to process the data. >> >> I will do some profiling later (if I have some time). >> >>> I'm still surprised that this takes so long. If none of the demos in 'image.dem' and 'image2.dem' are glacial-pace slow, >> >> They don't use the 'pixels' option for plot. > > That's true. But they do use the same polygon code ultimately. > > >> Just the following command (without any scaling etc.) takes a long time: >> >> plot 'blutux.rgb' binary array=(128,128) flipy format='%uchar' with rgbimage pixels > > How long does the following plot take?: > > plot 'blutux.rgb' binary array=(128,128) flipy rotation=30d > format='%uchar' with rgbimage If the above isn't as slow as your example using "pixels" option, then the difference is that one is using parallelograms and the other rectangles. The example that uses rectangles (the slow example), calls (*term->fillbox). In the aquaterm.c file fillbox has a log message at the front that filled_polygon does not, i.e., LOG(@"\nstyle=%d\nstyle & 0xf = %d\nfillpar=%d\n", style, style & 0xf, style >> 4); Whenever some numbers are changed to ASCII it expands the data quite a bit. Could it be that for each pixel one of the log messages is being put in some type of AQUA debugger? And that debugger could be processing a lot of data, and it might have to dynamically build a list of log messages so could be inefficient. All a guess. Do you know if you have debugging active? http://www.roseindia.net/tutorial/iphone/examples/nslog/index.html Is there some way of undefining LOGGING and recompile?: #ifdef LOGGING #define LOG NSLog #else #define LOG NOOP_ #endif /* LOGGING */ Dan |