From: Jennifer A. <jm...@co...> - 2011-01-21 17:51:31
|
Dear All, I just sent this message to the Cairo forum, but I am copying it here to keep you in the loop regarding my progress with Cairo, and to see if you have any suggestions for how to get me out of the weeds. --Jennifer Begin forwarded message: > From: Jennifer Adams <jm...@co...> > Date: January 21, 2011 12:31:50 PM EST > To: cairo <ca...@ca...> > Subject: Issues with Store-Bought v. Home-Grown builds of Cairo > > Dear Experts, > > I apologize in advance for a long email ... I'm just trying to be > thorough. The bottom line is my own build of Cairo compared with the > macports/yum build is MUCH too slow, and I don't know why. > > I am working toward getting Cairo to handle all the graphics for > GrADS, an open-source program for the analysis and display of > meteorological data. The old way of doing graphics in GrADS was a > combination of direct calls to the X11 library (for the X window > interface), calls to the gd library (for image output), plus some > extremely dated code to create postscript output. All text was drawn > in Hershey fonts. Cairo improves on this mish-mash in so many ways; > the graphics are looking absolutely fantastic, the toy font API is > adequate for our needs, and I know my users are going to be very > excited when they see these improvements. > > For GrADS distribution, I provide binary executables for a small set > of platforms, but many users must build from source. GrADS requires > a long list of supplemental libraries to fully enable all its > features: the current count is 20. With the exception of X11 and a > few other system libs, we link statically with all these supplibs, > so that our binaries are portable (some of the supplibs GrADS needs > are rather obscure.) I get the impression from browsing through the > forum archives that linking statically with Cairo isn't really the > right way to do it, so during my development and testing I have been > linking dynamically with a macports build of Cairo. It's been fine > that way, a little slower than the old way of using direct X11 > calls, but not deal-breakingly slow. > > Looking forward to the time when I must put out a release, I am > trying to integrate Cairo into the GrADS autoconfiguration scripts > and the setup we have for building all the supplibs from source. I > can't assume that all my users will have macports or yum to do the > dirty work for them, so I provide a set of instructions to build the > libraries from source and link them with GrADS. It is something like > the end-to-end build instructions on the Cairo website. I try to > keep it as simple as possible, and tailor these instructions for the > specific needs of GrADS. > > Testing out my home-grown Cairo recipe, it built without any > problems (specifics given below). Then I linked GrADS two ways, one > with the macports build (gfast), the other with my home-grown build > (gslow). More specifics on how I linked the executables and output > from otool are given below. The performance difference between glsow > v. gfast is astonishing. Where gfast took 1-2 seconds to draw a > plot, gslow took ~100 seconds to do the same thing. I reran all > these steps on our 64-bit linux server running CentOS 5.4 and got > similar results. > > Thanks to earlier answers I got regarding getting cairo-trace to > work, I created a huge trace file, but I'm not sure how to interpret > it. It contained ~77,000 fills and ~10,000 strokes. I reran cairo- > trace with the --profile option and posted it at ftp://iges.org/pub/jma/gs.89039.lzma > . The output from running cairo-perf-trace on my trace file is > given below. I have no idea whether the trace info is helpful. > > What I could use is some advice about linking statically v. > dynamically for my binary distributions, and some guidance for how > to build Cairo from source (with only as-needed features) and link > it with my application so that I get the same performance as the > carefully packaged, fully-enabled versions of Cairo. > > Thank you!! > --Jennifer > > > > -- > Jennifer M. Adams > IGES/COLA > 4041 Powder Mill Road, Suite 302 > Calverton, MD 20705 > jm...@co... > > > > OS X version 10.5.8 > > > uname -a > Darwin Atlantic-2.local 9.8.0 Darwin Kernel Version 9.8.0: Wed Jul > 15 16:55:01 PDT 2009; root:xnu-1228.15.4~1/RELEASE_I386 i386 > > > gcc --version > i686-apple-darwin9-gcc-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5490) > > > Configuration options used to build cairo from source: > pkg-config-0.23 > (I then set the environment vars PKG_CONFIG and PKG_CONFIG_PATH to > the appropriate places) > pixman-0.21.2 > freetype-2.4.3 --without-fsspec --without-fsref --without-ats -- > without-quickdraw-toolbox --without-quickdraw-carbon > fontconfig-2.8.0 --enable-libxml2 --with-freetype-config=... > cairo-1.10.2 --disable-dependency-tracking \ > --enable-xlib=yes \ > --enable-xml=yes \ > --enable-fc=yes \ > --enable-ft=yes \ > --enable-xlib-xrender=no \ > --enable-xcb=no \ > --enable-qt=no \ > --enable-quartz=no \ > --enable-win32=no \ > --enable-skia=no \ > --enable-os2=no \ > --enable-beos=no \ > --enable-drm=no \ > --enable-pthread \ > --enable-gl=no > > > Linking commands used to build gfast and gslow (relevant bits > highlighed in red): > > gcc -g -O2 -lSystemStubs -o gslow grads.o gxsubs.o gxmeta.o > gxchpl.o gxcntr.o gxstrm.o gxwmap.o gxshad.o gxshad2.o gaexpr.o > gafunc.o gautil.o gagx.o gscrpt.o gamach.o bufrstn.o gabufr.o > gabufrtbl.o gxX.o gxdxwd.o galloc.o gaddes.o gaio.o gacfg.o gauser.o > gasdf.o gatxt.o -L/Users/jma/supplibs/lib -lcairo -L/usr/X11R6/lib - > lX11 /Users/jma/supplibs/lib/libreadline.a /Users/jma/supplibs/lib/ > libncurses.a /Users/jma/supplibs/lib/libgd.a /Users/jma/supplibs/ > lib/libpng12.a /Users/jma/supplibs/lib/libz.a /Users/jma/supplibs/ > lib/libjpeg.a /Users/jma/supplibs/lib/libgrib2c.a /Users/jma/ > supplibs/lib/libjasper.a /Users/jma/supplibs/lib/libpng12.a /Users/ > jma/supplibs/lib/libz.a /Users/jma/supplibs/lib/libmfhdf.a /Users/ > jma/supplibs/lib/libdf.a /Users/jma/supplibs/lib/libudunits.a /Users/ > jma/supplibs/lib/libsz.a /Users/jma/supplibs/lib/libjpeg.a /Users/ > jma/supplibs/lib/libz.a /Users/jma/supplibs/lib/libhdf5.a /Users/jma/ > supplibs/lib/libsz.a /Users/jma/supplibs/lib/libjpeg.a /Users/jma/ > supplibs/lib/libz.a /Users/jma/supplibs/lib/libudunits.a /Users/jma/ > supplibs/lib/libnetcdf.a /Users/jma/supplibs/lib/libhdf5_hl.a /Users/ > jma/supplibs/lib/libhdf5.a /Users/jma/supplibs/lib/libz.a /Users/jma/ > supplibs/lib/libsz.a /Users/jma/supplibs/lib/libcurl.a /Users/jma/ > supplibs/lib/libtiff.a /Users/jma/supplibs/lib/libgeotiff.a /Users/ > jma/supplibs/lib/libshp.a -lm > > gcc -g -O2 -lSystemStubs -o gfast grads.o gxsubs.o gxmeta.o > gxchpl.o gxcntr.o gxstrm.o gxwmap.o gxshad.o gxshad2.o gaexpr.o > gafunc.o gautil.o gagx.o gscrpt.o gamach.o bufrstn.o gabufr.o > gabufrtbl.o gxX.o gxdxwd.o galloc.o gaddes.o gaio.o gacfg.o gauser.o > gasdf.o gatxt.o -L/opt/local/lib -lcairo -lX11 /Users/jma/supplibs/ > lib/libreadline.a /Users/jma/supplibs/lib/libncurses.a /Users/jma/ > supplibs/lib/libgd.a /Users/jma/supplibs/lib/libpng12.a /Users/jma/ > supplibs/lib/libz.a /Users/jma/supplibs/lib/libjpeg.a /Users/jma/ > supplibs/lib/libgrib2c.a /Users/jma/supplibs/lib/libjasper.a /Users/ > jma/supplibs/lib/libpng12.a /Users/jma/supplibs/lib/libz.a /Users/ > jma/supplibs/lib/libmfhdf.a /Users/jma/supplibs/lib/libdf.a /Users/ > jma/supplibs/lib/libudunits.a /Users/jma/supplibs/lib/libsz.a /Users/ > jma/supplibs/lib/libjpeg.a /Users/jma/supplibs/lib/libz.a /Users/jma/ > supplibs/lib/libhdf5.a /Users/jma/supplibs/lib/libsz.a /Users/jma/ > supplibs/lib/libjpeg.a /Users/jma/supplibs/lib/libz.a /Users/jma/ > supplibs/lib/libudunits.a /Users/jma/supplibs/lib/libnetcdf.a /Users/ > jma/supplibs/lib/libhdf5_hl.a /Users/jma/supplibs/lib/libhdf5.a / > Users/jma/supplibs/lib/libz.a /Users/jma/supplibs/lib/libsz.a /Users/ > jma/supplibs/lib/libcurl.a /Users/jma/supplibs/lib/libtiff.a /Users/ > jma/supplibs/lib/libgeotiff.a /Users/jma/supplibs/lib/libshp.a -lm > > > > otool -L gslow > gslow: > /Users/jma/supplibs/src/cairo/lib/libcairo.2.dylib > (compatibility version 11003.0.0, current version 11003.2.0) > /usr/X11/lib/libX11.6.dylib (compatibility version 9.0.0, > current version 9.0.0) > /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, > current version 111.1.5) > /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, > current version 1.0.0) > > otool -L gfast > gfast: > /opt/local/lib/libcairo.2.dylib (compatibility version > 11003.0.0, current version 11003.0.0) > /opt/local/lib/libX11.6.dylib (compatibility version 10.0.0, > current version 10.0.0) > /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, > current version 111.1.5) > /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, > current version 1.0.0) > > > > cairo-perf-trace gg.88743.trace > [ # ] backend test min(s) median(s) > stddev. count > [ # ] image: pixman 0.21.2 > [ 0] image gg 0.691 0.696 > 0.30% 6/6 > [ # ] image16: pixman 0.21.2 > [ 0] image16 gg 0.692 0.696 > 0.21% 6/6 > > |
From: Mike F. <mfi...@gm...> - 2011-01-23 18:11:48
|
hi Brian, of course performance is critical to me too; i use printim for my production, mainly because i do layers (-t and -b). i use gxyat on occasion and it is slower (uses Cairo?) but the graphics better (but bigger) and -t and -b don't work. so for production, it'd be important for me to have the fast gd printim. thanks /r mike p.s. are any of you in seattle for the ams? i'm giving a talk in the python symposium about my wxmaps and how i use grads.py to give grads an oop interface On 1/22/11 1:45 PM, Brian Doty wrote: > Hi Gary, performance is a high priority. We depend on grads' > performance in many ways. So we plan on maintaining a "native" X > interface, similar to what exists in grads now. None of the new > functionality would be available when the "native" interface is being > used. But the performance should be essentially the same as is the > case currently. > > Do you do all your graphics through X? Or do you also use printim? > We are currently planning to drop the GD library in favor of Cairo for > image production, and that would be a loss of performance. We gain > anti-aliasing, raster fonts, and transparency. We are not sure as yet > of the performance implications; if significant we may need to keep > the GD interface around. We are still figuring these things out. > Unfortunately we are finding that Cairo performance characteristics > are platform dependent.... Brian > > On Jan 22, 2011, at 4:01 AM, Love, Mr. Gary, Contractor, Code 7542 > wrote: > >> Hi Jennifer, >> >> I like the sound of improved graphics, but even gfast will not be >> fast enough. The current X11 library version generates a plot in >> 200-300 milliseconds, 5 times faster. GrADS' current speed is one >> of its best features which has always been very important to NRL and >> FNMOC, since our post processing for just one project already takes >> 30 minutes because so many plots are needed. >> >> I hope newer versions of GrADS can still be compiled with the X11 >> libs. >> >> Gary >> >> From: Jennifer Adams [mailto:jm...@co...] >> Sent: Friday, January 21, 2011 9:36 AM >> To: ope...@li... >> Cc: Brian Doty >> Subject: [Opengrads-devel] Fwd: Issues with Store-Bought v. Home- >> Grown builds of Cairo >> >> Dear All, >> I just sent this message to the Cairo forum, but I am copying it >> here to keep you in the loop regarding my progress with Cairo, and >> to see if you have any suggestions for how to get me out of the weeds. >> --Jennifer >> >> >> Begin forwarded message: >> >>> From: Jennifer Adams <jm...@co...> >>> Date: January 21, 2011 12:31:50 PM EST >>> To: cairo <ca...@ca...> >>> Subject: Issues with Store-Bought v. Home-Grown builds of Cairo >>> >>> Dear Experts, >>> >>> I apologize in advance for a long email ... I'm just trying to be >>> thorough. The bottom line is my own build of Cairo compared with >>> the macports/yum build is MUCH too slow, and I don't know why. >>> >>> I am working toward getting Cairo to handle all the graphics for >>> GrADS, an open-source program for the analysis and display of >>> meteorological data. The old way of doing graphics in GrADS was a >>> combination of direct calls to the X11 library (for the X window >>> interface), calls to the gd library (for image output), plus some >>> extremely dated code to create postscript output. All text was >>> drawn in Hershey fonts. Cairo improves on this mish-mash in so many >>> ways; the graphics are looking absolutely fantastic, the toy font >>> API is adequate for our needs, and I know my users are going to be >>> very excited when they see these improvements. >>> >>> For GrADS distribution, I provide binary executables for a small >>> set of platforms, but many users must build from source. GrADS >>> requires a long list of supplemental libraries to fully enable all >>> its features: the current count is 20. With the exception of X11 >>> and a few other system libs, we link statically with all these >>> supplibs, so that our binaries are portable (some of the supplibs >>> GrADS needs are rather obscure.) I get the impression from browsing >>> through the forum archives that linking statically with Cairo isn't >>> really the right way to do it, so during my development and testing >>> I have been linking dynamically with a macports build of Cairo. >>> It's been fine that way, a little slower than the old way of using >>> direct X11 calls, but not deal-breakingly slow. >>> >>> Looking forward to the time when I must put out a release, I am >>> trying to integrate Cairo into the GrADS autoconfiguration scripts >>> and the setup we have for building all the supplibs from source. I >>> can't assume that all my users will have macports or yum to do the >>> dirty work for them, so I provide a set of instructions to build >>> the libraries from source and link them with GrADS. It is something >>> like the end-to-end build instructions on the Cairo website. I try >>> to keep it as simple as possible, and tailor these instructions for >>> the specific needs of GrADS. >>> >>> Testing out my home-grown Cairo recipe, it built without any >>> problems (specifics given below). Then I linked GrADS two ways, one >>> with the macports build (gfast), the other with my home-grown build >>> (gslow). More specifics on how I linked the executables and output >>> from otool are given below. The performance difference between >>> glsow v. gfast is astonishing. Where gfast took 1-2 seconds to draw >>> a plot, gslow took ~100 seconds to do the same thing. I reran all >>> these steps on our 64-bit linux server running CentOS 5.4 and got >>> similar results. >>> >>> Thanks to earlier answers I got regarding getting cairo-trace to >>> work, I created a huge trace file, but I'm not sure how to >>> interpret it. It contained ~77,000 fills and ~10,000 strokes. I >>> reran cairo-trace with the --profile option and posted it at ftp://iges.org/pub/jma/gs.89039.lzma >>> . The output from running cairo-perf-trace on my trace file is >>> given below. I have no idea whether the trace info is helpful. >>> >>> What I could use is some advice about linking statically v. >>> dynamically for my binary distributions, and some guidance for how >>> to build Cairo from source (with only as-needed features) and >>> link it with my application so that I get the same performance as >>> the carefully packaged, fully-enabled versions of Cairo. >>> >>> Thank you!! >>> --Jennifer >>> >>> >>> >>> -- >>> Jennifer M. Adams >>> IGES/COLA >>> 4041 Powder Mill Road, Suite 302 >>> Calverton, MD 20705 >>> jm...@co... >>> >>> >>> >>> OS X version 10.5.8 >>> >>>> uname -a >>> Darwin Atlantic-2.local 9.8.0 Darwin Kernel Version 9.8.0: Wed Jul >>> 15 16:55:01 PDT 2009; root:xnu-1228.15.4~1/RELEASE_I386 i386 >>> >>>> gcc --version >>> i686-apple-darwin9-gcc-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5490) >>> >>> >>> Configuration options used to build cairo from source: >>> pkg-config-0.23 >>> (I then set the environment vars PKG_CONFIG and PKG_CONFIG_PATH to >>> the appropriate places) >>> pixman-0.21.2 >>> freetype-2.4.3 --without-fsspec --without-fsref --without-ats -- >>> without-quickdraw-toolbox --without-quickdraw-carbon >>> fontconfig-2.8.0 --enable-libxml2 --with-freetype-config=... >>> cairo-1.10.2 --disable-dependency-tracking \ >>> --enable-xlib=yes \ >>> --enable-xml=yes \ >>> --enable-fc=yes \ >>> --enable-ft=yes \ >>> --enable-xlib-xrender=no \ >>> --enable-xcb=no \ >>> --enable-qt=no \ >>> --enable-quartz=no \ >>> --enable-win32=no \ >>> --enable-skia=no \ >>> --enable-os2=no \ >>> --enable-beos=no \ >>> --enable-drm=no \ >>> --enable-pthread \ >>> --enable-gl=no >>> >>> >>> Linking commands used to build gfast and gslow (relevant bits >>> highlighed in red): >>> >>> gcc -g -O2 -lSystemStubs -o gslow grads.o gxsubs.o gxmeta.o >>> gxchpl.o gxcntr.o gxstrm.o gxwmap.o gxshad.o gxshad2.o gaexpr.o >>> gafunc.o gautil.o gagx.o gscrpt.o gamach.o bufrstn.o gabufr.o >>> gabufrtbl.o gxX.o gxdxwd.o galloc.o gaddes.o gaio.o gacfg.o >>> gauser.o gasdf.o gatxt.o -L/Users/jma/supplibs/lib -lcairo -L/usr/ >>> X11R6/lib -lX11 /Users/jma/supplibs/lib/libreadline.a /Users/jma/ >>> supplibs/lib/libncurses.a /Users/jma/supplibs/lib/libgd.a /Users/ >>> jma/supplibs/lib/libpng12.a /Users/jma/supplibs/lib/libz.a /Users/ >>> jma/supplibs/lib/libjpeg.a /Users/jma/supplibs/lib/libgrib2c.a / >>> Users/jma/supplibs/lib/libjasper.a /Users/jma/supplibs/lib/ >>> libpng12.a /Users/jma/supplibs/lib/libz.a /Users/jma/supplibs/lib/ >>> libmfhdf.a /Users/jma/supplibs/lib/libdf.a /Users/jma/supplibs/lib/ >>> libudunits.a /Users/jma/supplibs/lib/libsz.a /Users/jma/supplibs/ >>> lib/libjpeg.a /Users/jma/supplibs/lib/libz.a /Users/jma/supplibs/ >>> lib/libhdf5.a /Users/jma/supplibs/lib/libsz.a /Users/jma/supplibs/ >>> lib/libjpeg.a /Users/jma/supplibs/lib/libz.a /Users/jma/supplibs/ >>> lib/libudunits.a /Users/jma/supplibs/lib/libnetcdf.a /Users/jma/ >>> supplibs/lib/libhdf5_hl.a /Users/jma/supplibs/lib/libhdf5.a /Users/ >>> jma/supplibs/lib/libz.a /Users/jma/supplibs/lib/libsz.a /Users/jma/ >>> supplibs/lib/libcurl.a /Users/jma/supplibs/lib/libtiff.a /Users/ >>> jma/supplibs/lib/libgeotiff.a /Users/jma/supplibs/lib/libshp.a -lm >>> >>> gcc -g -O2 -lSystemStubs -o gfast grads.o gxsubs.o gxmeta.o >>> gxchpl.o gxcntr.o gxstrm.o gxwmap.o gxshad.o gxshad2.o gaexpr.o >>> gafunc.o gautil.o gagx.o gscrpt.o gamach.o bufrstn.o gabufr.o >>> gabufrtbl.o gxX.o gxdxwd.o galloc.o gaddes.o gaio.o gacfg.o >>> gauser.o gasdf.o gatxt.o -L/opt/local/lib -lcairo -lX11 /Users/jma/ >>> supplibs/lib/libreadline.a /Users/jma/supplibs/lib/libncurses.a / >>> Users/jma/supplibs/lib/libgd.a /Users/jma/supplibs/lib/libpng12.a / >>> Users/jma/supplibs/lib/libz.a /Users/jma/supplibs/lib/libjpeg.a / >>> Users/jma/supplibs/lib/libgrib2c.a /Users/jma/supplibs/lib/ >>> libjasper.a /Users/jma/supplibs/lib/libpng12.a /Users/jma/supplibs/ >>> lib/libz.a /Users/jma/supplibs/lib/libmfhdf.a /Users/jma/supplibs/ >>> lib/libdf.a /Users/jma/supplibs/lib/libudunits.a /Users/jma/ >>> supplibs/lib/libsz.a /Users/jma/supplibs/lib/libjpeg.a /Users/jma/ >>> supplibs/lib/libz.a /Users/jma/supplibs/lib/libhdf5.a /Users/jma/ >>> supplibs/lib/libsz.a /Users/jma/supplibs/lib/libjpeg.a /Users/jma/ >>> supplibs/lib/libz.a /Users/jma/supplibs/lib/libudunits.a /Users/jma/ >>> supplibs/lib/libnetcdf.a /Users/jma/supplibs/lib/libhdf5_hl.a / >>> Users/jma/supplibs/lib/libhdf5.a /Users/jma/supplibs/lib/libz.a / >>> Users/jma/supplibs/lib/libsz.a /Users/jma/supplibs/lib/libcurl.a / >>> Users/jma/supplibs/lib/libtiff.a /Users/jma/supplibs/lib/ >>> libgeotiff.a /Users/jma/supplibs/lib/libshp.a -lm >>> >>> >>>> otool -L gslow >>> gslow: >>> /Users/jma/supplibs/src/cairo/lib/libcairo.2.dylib >>> (compatibility version 11003.0.0, current version 11003.2.0) >>> /usr/X11/lib/libX11.6.dylib (compatibility version 9.0.0, >>> current version 9.0.0) >>> /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, >>> current version 111.1.5) >>> /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, >>> current version 1.0.0) >>>> otool -L gfast >>> gfast: >>> /opt/local/lib/libcairo.2.dylib (compatibility version >>> 11003.0.0, current version 11003.0.0) >>> /opt/local/lib/libX11.6.dylib (compatibility version >>> 10.0.0, current version 10.0.0) >>> /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, >>> current version 111.1.5) >>> /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, >>> current version 1.0.0) >>> >>> >>>> cairo-perf-trace gg.88743.trace >>> [ # ] backend test min(s) median(s) >>> stddev. count >>> [ # ] image: pixman 0.21.2 >>> [ 0] image gg 0.691 0.696 >>> 0.30% 6/6 >>> [ # ] image16: pixman 0.21.2 >>> [ 0] image16 gg 0.692 0.696 >>> 0.21% 6/6 >>> >>> >> > > > ------------------------------------------------------------------------------ > Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! > Finally, a world-class log management solution at an even better price-free! > Download using promo code Free_Logger_4_Dev2Dev. Offer expires > February 28th, so secure your free ArcSight Logger TODAY! > http://p.sf.net/sfu/arcsight-sfd2d > _______________________________________________ > Opengrads-devel mailing list > Ope...@li... > https://lists.sourceforge.net/lists/listinfo/opengrads-devel |
From: Arlindo da S. <da...@al...> - 2011-01-25 02:43:55
|
On Sun, Jan 23, 2011 at 1:11 PM, Mike Fiorino <mfi...@gm...> wrote: > hi Brian, > > of course performance is critical to me too; i use printim for my > production, mainly because i do layers (-t and -b). i use gxyat on > occasion and it is slower (uses Cairo?) Yep, cairo. > but the graphics better (but > bigger) There is a trick to make the files smaller. The reason is that anti-aliasing requires 32-bit graphics but once the image is rendered you can quantize it down to 8-bits (as in printim). By piping to the included "pngquant" utility (gxyat -o "|pngquant 256> myfile.png") you get a much smaller file with negligible loss in quality. > and -t Transparency in gxyat is actually a lot more flexible as you can define an alpha channel for each color... > and -b don't work. Yes, I never got around to implementing this... > so for production, it'd be important > for me to have the fast gd printim. > I second that, although at GMAO we do use gxyat for production. I don't remember the performance penalty being that prohibitive. It would be good to benchmark gxyat vs printim. I was not aware the performance is system dependent as pointed out by Brian. > thanks /r mike > > p.s. are any of you in seattle for the ams? i'm giving a talk in the > python symposium about my wxmaps and how i use grads.py to give grads an > oop interface > > Sorry to miss your talk but I am skipping the AMS this year, just too busy around here. I've been slowing evolving pygrads, not too many features of lately. Next on my list is to add volumetric visualization through MayaVi, the so-called gaya.py. Arlindo > > > On 1/22/11 1:45 PM, Brian Doty wrote: > > Hi Gary, performance is a high priority. We depend on grads' > > performance in many ways. So we plan on maintaining a "native" X > > interface, similar to what exists in grads now. None of the new > > functionality would be available when the "native" interface is being > > used. But the performance should be essentially the same as is the > > case currently. > > > > Do you do all your graphics through X? Or do you also use printim? > > We are currently planning to drop the GD library in favor of Cairo for > > image production, and that would be a loss of performance. We gain > > anti-aliasing, raster fonts, and transparency. We are not sure as yet > > of the performance implications; if significant we may need to keep > > the GD interface around. We are still figuring these things out. > > Unfortunately we are finding that Cairo performance characteristics > > are platform dependent.... Brian > > > > On Jan 22, 2011, at 4:01 AM, Love, Mr. Gary, Contractor, Code 7542 > > wrote: > > > >> Hi Jennifer, > >> > >> I like the sound of improved graphics, but even gfast will not be > >> fast enough. The current X11 library version generates a plot in > >> 200-300 milliseconds, 5 times faster. GrADS' current speed is one > >> of its best features which has always been very important to NRL and > >> FNMOC, since our post processing for just one project already takes > >> 30 minutes because so many plots are needed. > >> > >> I hope newer versions of GrADS can still be compiled with the X11 > >> libs. > >> > >> Gary > >> > >> From: Jennifer Adams [mailto:jm...@co...] > >> Sent: Friday, January 21, 2011 9:36 AM > >> To: ope...@li... > >> Cc: Brian Doty > >> Subject: [Opengrads-devel] Fwd: Issues with Store-Bought v. Home- > >> Grown builds of Cairo > >> > >> Dear All, > >> I just sent this message to the Cairo forum, but I am copying it > >> here to keep you in the loop regarding my progress with Cairo, and > >> to see if you have any suggestions for how to get me out of the weeds. > >> --Jennifer > >> > >> > >> Begin forwarded message: > >> > >>> From: Jennifer Adams <jm...@co...> > >>> Date: January 21, 2011 12:31:50 PM EST > >>> To: cairo <ca...@ca...> > >>> Subject: Issues with Store-Bought v. Home-Grown builds of Cairo > >>> > >>> Dear Experts, > >>> > >>> I apologize in advance for a long email ... I'm just trying to be > >>> thorough. The bottom line is my own build of Cairo compared with > >>> the macports/yum build is MUCH too slow, and I don't know why. > >>> > >>> I am working toward getting Cairo to handle all the graphics for > >>> GrADS, an open-source program for the analysis and display of > >>> meteorological data. The old way of doing graphics in GrADS was a > >>> combination of direct calls to the X11 library (for the X window > >>> interface), calls to the gd library (for image output), plus some > >>> extremely dated code to create postscript output. All text was > >>> drawn in Hershey fonts. Cairo improves on this mish-mash in so many > >>> ways; the graphics are looking absolutely fantastic, the toy font > >>> API is adequate for our needs, and I know my users are going to be > >>> very excited when they see these improvements. > >>> > >>> For GrADS distribution, I provide binary executables for a small > >>> set of platforms, but many users must build from source. GrADS > >>> requires a long list of supplemental libraries to fully enable all > >>> its features: the current count is 20. With the exception of X11 > >>> and a few other system libs, we link statically with all these > >>> supplibs, so that our binaries are portable (some of the supplibs > >>> GrADS needs are rather obscure.) I get the impression from browsing > >>> through the forum archives that linking statically with Cairo isn't > >>> really the right way to do it, so during my development and testing > >>> I have been linking dynamically with a macports build of Cairo. > >>> It's been fine that way, a little slower than the old way of using > >>> direct X11 calls, but not deal-breakingly slow. > >>> > >>> Looking forward to the time when I must put out a release, I am > >>> trying to integrate Cairo into the GrADS autoconfiguration scripts > >>> and the setup we have for building all the supplibs from source. I > >>> can't assume that all my users will have macports or yum to do the > >>> dirty work for them, so I provide a set of instructions to build > >>> the libraries from source and link them with GrADS. It is something > >>> like the end-to-end build instructions on the Cairo website. I try > >>> to keep it as simple as possible, and tailor these instructions for > >>> the specific needs of GrADS. > >>> > >>> Testing out my home-grown Cairo recipe, it built without any > >>> problems (specifics given below). Then I linked GrADS two ways, one > >>> with the macports build (gfast), the other with my home-grown build > >>> (gslow). More specifics on how I linked the executables and output > >>> from otool are given below. The performance difference between > >>> glsow v. gfast is astonishing. Where gfast took 1-2 seconds to draw > >>> a plot, gslow took ~100 seconds to do the same thing. I reran all > >>> these steps on our 64-bit linux server running CentOS 5.4 and got > >>> similar results. > >>> > >>> Thanks to earlier answers I got regarding getting cairo-trace to > >>> work, I created a huge trace file, but I'm not sure how to > >>> interpret it. It contained ~77,000 fills and ~10,000 strokes. I > >>> reran cairo-trace with the --profile option and posted it at > ftp://iges.org/pub/jma/gs.89039.lzma > >>> . The output from running cairo-perf-trace on my trace file is > >>> given below. I have no idea whether the trace info is helpful. > >>> > >>> What I could use is some advice about linking statically v. > >>> dynamically for my binary distributions, and some guidance for how > >>> to build Cairo from source (with only as-needed features) and > >>> link it with my application so that I get the same performance as > >>> the carefully packaged, fully-enabled versions of Cairo. > >>> > >>> Thank you!! > >>> --Jennifer > >>> > >>> > >>> > >>> -- > >>> Jennifer M. Adams > >>> IGES/COLA > >>> 4041 Powder Mill Road, Suite 302 > >>> Calverton, MD 20705 > >>> jm...@co... > >>> > >>> > >>> > >>> OS X version 10.5.8 > >>> > >>>> uname -a > >>> Darwin Atlantic-2.local 9.8.0 Darwin Kernel Version 9.8.0: Wed Jul > >>> 15 16:55:01 PDT 2009; root:xnu-1228.15.4~1/RELEASE_I386 i386 > >>> > >>>> gcc --version > >>> i686-apple-darwin9-gcc-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5490) > >>> > >>> > >>> Configuration options used to build cairo from source: > >>> pkg-config-0.23 > >>> (I then set the environment vars PKG_CONFIG and PKG_CONFIG_PATH to > >>> the appropriate places) > >>> pixman-0.21.2 > >>> freetype-2.4.3 --without-fsspec --without-fsref --without-ats -- > >>> without-quickdraw-toolbox --without-quickdraw-carbon > >>> fontconfig-2.8.0 --enable-libxml2 --with-freetype-config=... > >>> cairo-1.10.2 --disable-dependency-tracking \ > >>> --enable-xlib=yes \ > >>> --enable-xml=yes \ > >>> --enable-fc=yes \ > >>> --enable-ft=yes \ > >>> --enable-xlib-xrender=no \ > >>> --enable-xcb=no \ > >>> --enable-qt=no \ > >>> --enable-quartz=no \ > >>> --enable-win32=no \ > >>> --enable-skia=no \ > >>> --enable-os2=no \ > >>> --enable-beos=no \ > >>> --enable-drm=no \ > >>> --enable-pthread \ > >>> --enable-gl=no > >>> > >>> > >>> Linking commands used to build gfast and gslow (relevant bits > >>> highlighed in red): > >>> > >>> gcc -g -O2 -lSystemStubs -o gslow grads.o gxsubs.o gxmeta.o > >>> gxchpl.o gxcntr.o gxstrm.o gxwmap.o gxshad.o gxshad2.o gaexpr.o > >>> gafunc.o gautil.o gagx.o gscrpt.o gamach.o bufrstn.o gabufr.o > >>> gabufrtbl.o gxX.o gxdxwd.o galloc.o gaddes.o gaio.o gacfg.o > >>> gauser.o gasdf.o gatxt.o -L/Users/jma/supplibs/lib -lcairo -L/usr/ > >>> X11R6/lib -lX11 /Users/jma/supplibs/lib/libreadline.a /Users/jma/ > >>> supplibs/lib/libncurses.a /Users/jma/supplibs/lib/libgd.a /Users/ > >>> jma/supplibs/lib/libpng12.a /Users/jma/supplibs/lib/libz.a /Users/ > >>> jma/supplibs/lib/libjpeg.a /Users/jma/supplibs/lib/libgrib2c.a / > >>> Users/jma/supplibs/lib/libjasper.a /Users/jma/supplibs/lib/ > >>> libpng12.a /Users/jma/supplibs/lib/libz.a /Users/jma/supplibs/lib/ > >>> libmfhdf.a /Users/jma/supplibs/lib/libdf.a /Users/jma/supplibs/lib/ > >>> libudunits.a /Users/jma/supplibs/lib/libsz.a /Users/jma/supplibs/ > >>> lib/libjpeg.a /Users/jma/supplibs/lib/libz.a /Users/jma/supplibs/ > >>> lib/libhdf5.a /Users/jma/supplibs/lib/libsz.a /Users/jma/supplibs/ > >>> lib/libjpeg.a /Users/jma/supplibs/lib/libz.a /Users/jma/supplibs/ > >>> lib/libudunits.a /Users/jma/supplibs/lib/libnetcdf.a /Users/jma/ > >>> supplibs/lib/libhdf5_hl.a /Users/jma/supplibs/lib/libhdf5.a /Users/ > >>> jma/supplibs/lib/libz.a /Users/jma/supplibs/lib/libsz.a /Users/jma/ > >>> supplibs/lib/libcurl.a /Users/jma/supplibs/lib/libtiff.a /Users/ > >>> jma/supplibs/lib/libgeotiff.a /Users/jma/supplibs/lib/libshp.a -lm > >>> > >>> gcc -g -O2 -lSystemStubs -o gfast grads.o gxsubs.o gxmeta.o > >>> gxchpl.o gxcntr.o gxstrm.o gxwmap.o gxshad.o gxshad2.o gaexpr.o > >>> gafunc.o gautil.o gagx.o gscrpt.o gamach.o bufrstn.o gabufr.o > >>> gabufrtbl.o gxX.o gxdxwd.o galloc.o gaddes.o gaio.o gacfg.o > >>> gauser.o gasdf.o gatxt.o -L/opt/local/lib -lcairo -lX11 /Users/jma/ > >>> supplibs/lib/libreadline.a /Users/jma/supplibs/lib/libncurses.a / > >>> Users/jma/supplibs/lib/libgd.a /Users/jma/supplibs/lib/libpng12.a / > >>> Users/jma/supplibs/lib/libz.a /Users/jma/supplibs/lib/libjpeg.a / > >>> Users/jma/supplibs/lib/libgrib2c.a /Users/jma/supplibs/lib/ > >>> libjasper.a /Users/jma/supplibs/lib/libpng12.a /Users/jma/supplibs/ > >>> lib/libz.a /Users/jma/supplibs/lib/libmfhdf.a /Users/jma/supplibs/ > >>> lib/libdf.a /Users/jma/supplibs/lib/libudunits.a /Users/jma/ > >>> supplibs/lib/libsz.a /Users/jma/supplibs/lib/libjpeg.a /Users/jma/ > >>> supplibs/lib/libz.a /Users/jma/supplibs/lib/libhdf5.a /Users/jma/ > >>> supplibs/lib/libsz.a /Users/jma/supplibs/lib/libjpeg.a /Users/jma/ > >>> supplibs/lib/libz.a /Users/jma/supplibs/lib/libudunits.a /Users/jma/ > >>> supplibs/lib/libnetcdf.a /Users/jma/supplibs/lib/libhdf5_hl.a / > >>> Users/jma/supplibs/lib/libhdf5.a /Users/jma/supplibs/lib/libz.a / > >>> Users/jma/supplibs/lib/libsz.a /Users/jma/supplibs/lib/libcurl.a / > >>> Users/jma/supplibs/lib/libtiff.a /Users/jma/supplibs/lib/ > >>> libgeotiff.a /Users/jma/supplibs/lib/libshp.a -lm > >>> > >>> > >>>> otool -L gslow > >>> gslow: > >>> /Users/jma/supplibs/src/cairo/lib/libcairo.2.dylib > >>> (compatibility version 11003.0.0, current version 11003.2.0) > >>> /usr/X11/lib/libX11.6.dylib (compatibility version 9.0.0, > >>> current version 9.0.0) > >>> /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, > >>> current version 111.1.5) > >>> /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, > >>> current version 1.0.0) > >>>> otool -L gfast > >>> gfast: > >>> /opt/local/lib/libcairo.2.dylib (compatibility version > >>> 11003.0.0, current version 11003.0.0) > >>> /opt/local/lib/libX11.6.dylib (compatibility version > >>> 10.0.0, current version 10.0.0) > >>> /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, > >>> current version 111.1.5) > >>> /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, > >>> current version 1.0.0) > >>> > >>> > >>>> cairo-perf-trace gg.88743.trace > >>> [ # ] backend test min(s) median(s) > >>> stddev. count > >>> [ # ] image: pixman 0.21.2 > >>> [ 0] image gg 0.691 0.696 > >>> 0.30% 6/6 > >>> [ # ] image16: pixman 0.21.2 > >>> [ 0] image16 gg 0.692 0.696 > >>> 0.21% 6/6 > >>> > >>> > >> > > > > > > > ------------------------------------------------------------------------------ > > Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! > > Finally, a world-class log management solution at an even better > price-free! > > Download using promo code Free_Logger_4_Dev2Dev. Offer expires > > February 28th, so secure your free ArcSight Logger TODAY! > > http://p.sf.net/sfu/arcsight-sfd2d > > _______________________________________________ > > Opengrads-devel mailing list > > Ope...@li... > > https://lists.sourceforge.net/lists/listinfo/opengrads-devel > > > > ------------------------------------------------------------------------------ > Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! > Finally, a world-class log management solution at an even better > price-free! > Download using promo code Free_Logger_4_Dev2Dev. Offer expires > February 28th, so secure your free ArcSight Logger TODAY! > http://p.sf.net/sfu/arcsight-sfd2d > _______________________________________________ > Opengrads-devel mailing list > Ope...@li... > https://lists.sourceforge.net/lists/listinfo/opengrads-devel > -- Arlindo da Silva da...@al... |
From: Arlindo da S. <da...@al...> - 2011-01-25 02:21:01
|
On Fri, Jan 21, 2011 at 12:36 PM, Jennifer Adams <jm...@co...> wrote: > Dear All, > I just sent this message to the Cairo forum, but I am copying it here to > keep you in the loop regarding my progress with Cairo, and to see if you > have any suggestions for how to get me out of the weeds. > Quick Comments: 1) I've been including cairo in the opengrads releases for a couple of years now and it has work reliably on all platforms, including windows and freebsd. I was a little concerned in the beginning that the growing dependency list for cairo was going to be a nightmare but so far so good. 2) The current opengrads supplibs include cairo and its dependencies, although I do not do any drawing to the screen at this point. However, it would be simple to enable additional surfaces to support your new features. 3) Because cairo uses pkg-config, autoconf support is rather trivial (see Patrice's email earlier on). I also include pkg-config in the supplibs and it really helps ensure the consistency of the supplib/grads builds. It would be good if we could jointly maintain this supplib distribution. I got nearly 500 downloads for the latest supplib release I did for 2.0.a9, so I think a lot of people appreciate this semi-binary approach: grads sources, but pre-compiled supplibs. 4) Most of the opengrads supplibs are in the form of static .a libraries as customary in grads builds. However, in the recent releases of cairo I was not able to have a portable static build across all the platforms (without having to redo the build for cairo and its dependencies). I ended up building cairo as a shared library, and relying on wrapper scripts to ensure the correct shared libraries are linked at run time. I can go over the details and rationale if you are interested, but this mechanism has also improved the robustness of the builds as missing .so are include included in the distribution. (The users have no idea that "grads" is actually a script that points to the real binary down below.) The wrapper script is written in perl except under Windows where I use VBscript. Let me know if there is anything I can do to help. Arlindo ps: Can you explain what makes "gfast" be faster than "gslow"? Is this for PNG generation or drawing on the screen? > --Jennifer > > > Begin forwarded message: > > *From: *Jennifer Adams <jm...@co...> > *Date: *January 21, 2011 12:31:50 PM EST > *To: *cairo <ca...@ca...> > *Subject: **Issues with Store-Bought v. Home-Grown builds of Cairo * > > Dear Experts, > > I apologize in advance for a long email ... I'm just trying to be thorough. > The bottom line is my own build of Cairo compared with the macports/yum > build is MUCH too slow, and I don't know why. > > I am working toward getting Cairo to handle all the graphics for GrADS, an > open-source program for the analysis and display of meteorological data. The > old way of doing graphics in GrADS was a combination of direct calls to the > X11 library (for the X window interface), calls to the gd library (for image > output), plus some extremely dated code to create postscript output. All > text was drawn in Hershey fonts. Cairo improves on this mish-mash in so many > ways; the graphics are looking absolutely fantastic, the toy font API is > adequate for our needs, and I know my users are going to be very excited > when they see these improvements. > > For GrADS distribution, I provide binary executables for a small set of > platforms, but many users must build from source. GrADS requires a long list > of supplemental libraries to fully enable all its features: the current > count is 20. With the exception of X11 and a few other system libs, we link > statically with all these supplibs, so that our binaries are portable (some > of the supplibs GrADS needs are rather obscure.) I get the impression from > browsing through the forum archives that linking statically with Cairo isn't > really the right way to do it, so during my development and testing I have > been linking dynamically with a macports build of Cairo. It's been fine that > way, a little slower than the old way of using direct X11 calls, but not > deal-breakingly slow. > > Looking forward to the time when I must put out a release, I am trying to > integrate Cairo into the GrADS autoconfiguration scripts and the setup we > have for building all the supplibs from source. I can't assume that all my > users will have macports or yum to do the dirty work for them, so I provide > a set of instructions to build the libraries from source and link them with > GrADS. It is something like the end-to-end build instructions on the Cairo > website. I try to keep it as simple as possible, and tailor these > instructions for the specific needs of GrADS. > > Testing out my home-grown Cairo recipe, it built without any problems > (specifics given below). Then I linked GrADS two ways, one with the macports > build (gfast), the other with my home-grown build (gslow). More specifics on > how I linked the executables and output from otool are given below. The > performance difference between glsow v. gfast is astonishing. Where gfast > took 1-2 seconds to draw a plot, gslow took ~100 seconds to do the same > thing. I reran all these steps on our 64-bit linux server running CentOS 5.4 > and got similar results. > > Thanks to earlier answers I got regarding getting cairo-trace to work, I > created a huge trace file, but I'm not sure how to interpret it. It > contained ~77,000 fills and ~10,000 strokes. I reran cairo-trace with the > --profile option and posted it at ftp://iges.org/pub/jma/gs.89039.lzma . > The output from running cairo-perf-trace on my trace file is given below. I > have no idea whether the trace info is helpful. > > What I could use is some advice about linking statically v. dynamically for > my binary distributions, and some guidance for how to build Cairo from > source (with only as-needed features) and link it with my application so > that I get the same performance as the carefully packaged, fully-enabled > versions of Cairo. > > Thank you!! > --Jennifer > > > > -- > Jennifer M. Adams > IGES/COLA > 4041 Powder Mill Road, Suite 302 > Calverton, MD 20705 > jm...@co... > > > > OS X version 10.5.8 > > > uname -a > Darwin Atlantic-2.local 9.8.0 Darwin Kernel Version 9.8.0: Wed Jul 15 > 16:55:01 PDT 2009; root:xnu-1228.15.4~1/RELEASE_I386 i386 > > > gcc --version > i686-apple-darwin9-gcc-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5490) > > > Configuration options used to build cairo from source: > pkg-config-0.23 > (I then set the environment vars PKG_CONFIG and PKG_CONFIG_PATH to the > appropriate places) > pixman-0.21.2 > freetype-2.4.3 --without-fsspec --without-fsref > --without-ats --without-quickdraw-toolbox --without-quickdraw-carbon > fontconfig-2.8.0 --enable-libxml2 --with-freetype-config=... > cairo-1.10.2 --disable-dependency-tracking \ > --enable-xlib=yes \ > --enable-xml=yes \ > --enable-fc=yes \ > --enable-ft=yes \ > --enable-xlib-xrender=no \ > --enable-xcb=no \ > --enable-qt=no \ > --enable-quartz=no \ > --enable-win32=no \ > --enable-skia=no \ > --enable-os2=no \ > --enable-beos=no \ > --enable-drm=no \ > --enable-pthread \ > --enable-gl=no > > > Linking commands used to build gfast and gslow (relevant bits highlighed in > red): > > gcc -g -O2 -lSystemStubs -o gslow grads.o gxsubs.o gxmeta.o gxchpl.o > gxcntr.o gxstrm.o gxwmap.o gxshad.o gxshad2.o gaexpr.o gafunc.o gautil.o > gagx.o gscrpt.o gamach.o bufrstn.o gabufr.o gabufrtbl.o gxX.o gxdxwd.o > galloc.o gaddes.o gaio.o gacfg.o gauser.o gasdf.o gatxt.o -L/Users/jma/supplibs/lib > -lcairo -L/usr/X11R6/lib -lX11 /Users/jma/supplibs/lib/libreadline.a > /Users/jma/supplibs/lib/libncurses.a /Users/jma/supplibs/lib/libgd.a > /Users/jma/supplibs/lib/libpng12.a /Users/jma/supplibs/lib/libz.a > /Users/jma/supplibs/lib/libjpeg.a /Users/jma/supplibs/lib/libgrib2c.a > /Users/jma/supplibs/lib/libjasper.a /Users/jma/supplibs/lib/libpng12.a > /Users/jma/supplibs/lib/libz.a /Users/jma/supplibs/lib/libmfhdf.a > /Users/jma/supplibs/lib/libdf.a /Users/jma/supplibs/lib/libudunits.a > /Users/jma/supplibs/lib/libsz.a /Users/jma/supplibs/lib/libjpeg.a > /Users/jma/supplibs/lib/libz.a /Users/jma/supplibs/lib/libhdf5.a > /Users/jma/supplibs/lib/libsz.a /Users/jma/supplibs/lib/libjpeg.a > /Users/jma/supplibs/lib/libz.a /Users/jma/supplibs/lib/libudunits.a > /Users/jma/supplibs/lib/libnetcdf.a /Users/jma/supplibs/lib/libhdf5_hl.a > /Users/jma/supplibs/lib/libhdf5.a /Users/jma/supplibs/lib/libz.a > /Users/jma/supplibs/lib/libsz.a /Users/jma/supplibs/lib/libcurl.a > /Users/jma/supplibs/lib/libtiff.a /Users/jma/supplibs/lib/libgeotiff.a > /Users/jma/supplibs/lib/libshp.a -lm > > gcc -g -O2 -lSystemStubs -o gfast grads.o gxsubs.o gxmeta.o gxchpl.o > gxcntr.o gxstrm.o gxwmap.o gxshad.o gxshad2.o gaexpr.o gafunc.o gautil.o > gagx.o gscrpt.o gamach.o bufrstn.o gabufr.o gabufrtbl.o gxX.o gxdxwd.o > galloc.o gaddes.o gaio.o gacfg.o gauser.o gasdf.o gatxt.o -L/opt/local/lib > -lcairo -lX11 /Users/jma/supplibs/lib/libreadline.a > /Users/jma/supplibs/lib/libncurses.a /Users/jma/supplibs/lib/libgd.a > /Users/jma/supplibs/lib/libpng12.a /Users/jma/supplibs/lib/libz.a > /Users/jma/supplibs/lib/libjpeg.a /Users/jma/supplibs/lib/libgrib2c.a > /Users/jma/supplibs/lib/libjasper.a /Users/jma/supplibs/lib/libpng12.a > /Users/jma/supplibs/lib/libz.a /Users/jma/supplibs/lib/libmfhdf.a > /Users/jma/supplibs/lib/libdf.a /Users/jma/supplibs/lib/libudunits.a > /Users/jma/supplibs/lib/libsz.a /Users/jma/supplibs/lib/libjpeg.a > /Users/jma/supplibs/lib/libz.a /Users/jma/supplibs/lib/libhdf5.a > /Users/jma/supplibs/lib/libsz.a /Users/jma/supplibs/lib/libjpeg.a > /Users/jma/supplibs/lib/libz.a /Users/jma/supplibs/lib/libudunits.a > /Users/jma/supplibs/lib/libnetcdf.a /Users/jma/supplibs/lib/libhdf5_hl.a > /Users/jma/supplibs/lib/libhdf5.a /Users/jma/supplibs/lib/libz.a > /Users/jma/supplibs/lib/libsz.a /Users/jma/supplibs/lib/libcurl.a > /Users/jma/supplibs/lib/libtiff.a /Users/jma/supplibs/lib/libgeotiff.a > /Users/jma/supplibs/lib/libshp.a -lm > > > > otool -L gslow > gslow: > /Users/jma/supplibs/src/cairo/lib/libcairo.2.dylib (compatibility > version 11003.0.0, current version 11003.2.0) > /usr/X11/lib/libX11.6.dylib (compatibility version 9.0.0, current > version 9.0.0) > /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current > version 111.1.5) > /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current > version 1.0.0) > > otool -L gfast > gfast: > /opt/local/lib/libcairo.2.dylib (compatibility version 11003.0.0, > current version 11003.0.0) > /opt/local/lib/libX11.6.dylib (compatibility version 10.0.0, > current version 10.0.0) > /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current > version 111.1.5) > /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current > version 1.0.0) > > > > cairo-perf-trace gg.88743.trace > [ # ] backend test min(s) median(s) stddev. > count > [ # ] image: pixman 0.21.2 > [ 0] image gg 0.691 0.696 0.30% > 6/6 > [ # ] image16: pixman 0.21.2 > [ 0] image16 gg 0.692 0.696 0.21% > 6/6 > > > > > > ------------------------------------------------------------------------------ > Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! > Finally, a world-class log management solution at an even better > price-free! > Download using promo code Free_Logger_4_Dev2Dev. Offer expires > February 28th, so secure your free ArcSight Logger TODAY! > http://p.sf.net/sfu/arcsight-sfd2d > _______________________________________________ > Opengrads-devel mailing list > Ope...@li... > https://lists.sourceforge.net/lists/listinfo/opengrads-devel > > -- Arlindo da Silva da...@al... |
From: Jennifer A. <jm...@co...> - 2011-01-26 15:59:07
|
Dear All, I can get a stand-alone program and GrADS to link statically with my own cairo build on my mac. I'm pretty sure I'll be able to do that on our CentOS boxes as well. That is a big relief, because it means the GrADS distribution method won't have to change. The use of cairo will be handled as an optional feature. Brian and I feel that there should always be a usable version of GrADS that will compile and link without any supplibs at all. As for keeping the old printim code, it will be a nuisance to rewrite it to match the new structure of the metafile buffer, and it bloats GrADS, but we can keep it around for backwards compatibility and to avoid widespread panic. I don't think there will be a high demand for printim output after a side by side comparison with the cairo equivalent. The new supplibs (so far) are pkg-config, pixman, fontconfig, freetype, Xrender, and cairo. They all build without too much fuss. I will update my supplibs documentation page with all my notes and configure options. I hope that will easily translate into the opengrads supplibs distribution. > ps: Can you explain what makes "gfast" be faster than "gslow"? Is > this for PNG generation or drawing on the screen? gfast was linked dynamically with the macports build of cairo; gslow was linked with my own build that did not use libXrender. Once I added libXrender to my own cairo build, and relinked gslow, it was the same as gfast. All tests were based on drawing to an X window. We don't yet have any cairo code in GrADS to generate image output. --Jennifer On Jan 24, 2011, at 9:20 PM, Arlindo da Silva wrote: > On Fri, Jan 21, 2011 at 12:36 PM, Jennifer Adams <jm...@co...> > wrote: > Dear All, > I just sent this message to the Cairo forum, but I am copying it > here to keep you in the loop regarding my progress with Cairo, and > to see if you have any suggestions for how to get me out of the weeds. > > Quick Comments: > > 1) I've been including cairo in the opengrads releases for a couple > of years now and it has work reliably on all platforms, including > windows and freebsd. I was a little concerned in the beginning that > the growing dependency list for cairo was going to be a nightmare > but so far so good. > > 2) The current opengrads supplibs include cairo and its > dependencies, although I do not do any drawing to the screen at this > point. However, it would be simple to enable additional surfaces to > support your new features. > > 3) Because cairo uses pkg-config, autoconf support is rather trivial > (see Patrice's email earlier on). I also include pkg-config in the > supplibs and it really helps ensure the consistency of the supplib/ > grads builds. It would be good if we could jointly maintain this > supplib distribution. I got nearly 500 downloads for the latest > supplib release I did for 2.0.a9, so I think a lot of people > appreciate this semi-binary approach: grads sources, but pre- > compiled supplibs. > > 4) Most of the opengrads supplibs are in the form of static .a > libraries as customary in grads builds. However, in the recent > releases of cairo I was not able to have a portable static build > across all the platforms (without having to redo the build for cairo > and its dependencies). I ended up building cairo as a shared > library, and relying on wrapper scripts to ensure the correct shared > libraries are linked at run time. I can go over the details and > rationale if you are interested, but this mechanism has also > improved the robustness of the builds as missing .so are include > included in the distribution. (The users have no idea that "grads" > is actually a script that points to the real binary down below.) > The wrapper script is written in perl except under Windows where I > use VBscript. > > Let me know if there is anything I can do to help. > > Arlindo > > ps: Can you explain what makes "gfast" be faster than "gslow"? Is > this for PNG generation or drawing on the screen? > > > > > > > --Jennifer > > > Begin forwarded message: > >> From: Jennifer Adams <jm...@co...> >> Date: January 21, 2011 12:31:50 PM EST >> To: cairo <ca...@ca...> >> Subject: Issues with Store-Bought v. Home-Grown builds of Cairo >> >> Dear Experts, >> >> I apologize in advance for a long email ... I'm just trying to be >> thorough. The bottom line is my own build of Cairo compared with >> the macports/yum build is MUCH too slow, and I don't know why. >> >> I am working toward getting Cairo to handle all the graphics for >> GrADS, an open-source program for the analysis and display of >> meteorological data. The old way of doing graphics in GrADS was a >> combination of direct calls to the X11 library (for the X window >> interface), calls to the gd library (for image output), plus some >> extremely dated code to create postscript output. All text was >> drawn in Hershey fonts. Cairo improves on this mish-mash in so many >> ways; the graphics are looking absolutely fantastic, the toy font >> API is adequate for our needs, and I know my users are going to be >> very excited when they see these improvements. >> >> For GrADS distribution, I provide binary executables for a small >> set of platforms, but many users must build from source. GrADS >> requires a long list of supplemental libraries to fully enable all >> its features: the current count is 20. With the exception of X11 >> and a few other system libs, we link statically with all these >> supplibs, so that our binaries are portable (some of the supplibs >> GrADS needs are rather obscure.) I get the impression from browsing >> through the forum archives that linking statically with Cairo isn't >> really the right way to do it, so during my development and testing >> I have been linking dynamically with a macports build of Cairo. >> It's been fine that way, a little slower than the old way of using >> direct X11 calls, but not deal-breakingly slow. >> >> Looking forward to the time when I must put out a release, I am >> trying to integrate Cairo into the GrADS autoconfiguration scripts >> and the setup we have for building all the supplibs from source. I >> can't assume that all my users will have macports or yum to do the >> dirty work for them, so I provide a set of instructions to build >> the libraries from source and link them with GrADS. It is something >> like the end-to-end build instructions on the Cairo website. I try >> to keep it as simple as possible, and tailor these instructions for >> the specific needs of GrADS. >> >> Testing out my home-grown Cairo recipe, it built without any >> problems (specifics given below). Then I linked GrADS two ways, one >> with the macports build (gfast), the other with my home-grown build >> (gslow). More specifics on how I linked the executables and output >> from otool are given below. The performance difference between >> glsow v. gfast is astonishing. Where gfast took 1-2 seconds to draw >> a plot, gslow took ~100 seconds to do the same thing. I reran all >> these steps on our 64-bit linux server running CentOS 5.4 and got >> similar results. >> >> Thanks to earlier answers I got regarding getting cairo-trace to >> work, I created a huge trace file, but I'm not sure how to >> interpret it. It contained ~77,000 fills and ~10,000 strokes. I >> reran cairo-trace with the --profile option and posted it at ftp://iges.org/pub/jma/gs.89039.lzma >> . The output from running cairo-perf-trace on my trace file is >> given below. I have no idea whether the trace info is helpful. >> >> What I could use is some advice about linking statically v. >> dynamically for my binary distributions, and some guidance for how >> to build Cairo from source (with only as-needed features) and link >> it with my application so that I get the same performance as the >> carefully packaged, fully-enabled versions of Cairo. >> >> Thank you!! >> --Jennifer >> >> >> >> -- >> Jennifer M. Adams >> IGES/COLA >> 4041 Powder Mill Road, Suite 302 >> Calverton, MD 20705 >> jm...@co... >> >> >> >> OS X version 10.5.8 >> >> > uname -a >> Darwin Atlantic-2.local 9.8.0 Darwin Kernel Version 9.8.0: Wed Jul >> 15 16:55:01 PDT 2009; root:xnu-1228.15.4~1/RELEASE_I386 i386 >> >> > gcc --version >> i686-apple-darwin9-gcc-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5490) >> >> >> Configuration options used to build cairo from source: >> pkg-config-0.23 >> (I then set the environment vars PKG_CONFIG and PKG_CONFIG_PATH to >> the appropriate places) >> pixman-0.21.2 >> freetype-2.4.3 --without-fsspec --without-fsref --without-ats -- >> without-quickdraw-toolbox --without-quickdraw-carbon >> fontconfig-2.8.0 --enable-libxml2 --with-freetype-config=... >> cairo-1.10.2 --disable-dependency-tracking \ >> --enable-xlib=yes \ >> --enable-xml=yes \ >> --enable-fc=yes \ >> --enable-ft=yes \ >> --enable-xlib-xrender=no \ >> --enable-xcb=no \ >> --enable-qt=no \ >> --enable-quartz=no \ >> --enable-win32=no \ >> --enable-skia=no \ >> --enable-os2=no \ >> --enable-beos=no \ >> --enable-drm=no \ >> --enable-pthread \ >> --enable-gl=no >> >> >> Linking commands used to build gfast and gslow (relevant bits >> highlighed in red): >> >> gcc -g -O2 -lSystemStubs -o gslow grads.o gxsubs.o gxmeta.o >> gxchpl.o gxcntr.o gxstrm.o gxwmap.o gxshad.o gxshad2.o gaexpr.o >> gafunc.o gautil.o gagx.o gscrpt.o gamach.o bufrstn.o gabufr.o >> gabufrtbl.o gxX.o gxdxwd.o galloc.o gaddes.o gaio.o gacfg.o >> gauser.o gasdf.o gatxt.o -L/Users/jma/supplibs/lib -lcairo -L/usr/ >> X11R6/lib -lX11 /Users/jma/supplibs/lib/libreadline.a /Users/jma/ >> supplibs/lib/libncurses.a /Users/jma/supplibs/lib/libgd.a /Users/ >> jma/supplibs/lib/libpng12.a /Users/jma/supplibs/lib/libz.a /Users/ >> jma/supplibs/lib/libjpeg.a /Users/jma/supplibs/lib/libgrib2c.a / >> Users/jma/supplibs/lib/libjasper.a /Users/jma/supplibs/lib/ >> libpng12.a /Users/jma/supplibs/lib/libz.a /Users/jma/supplibs/lib/ >> libmfhdf.a /Users/jma/supplibs/lib/libdf.a /Users/jma/supplibs/lib/ >> libudunits.a /Users/jma/supplibs/lib/libsz.a /Users/jma/supplibs/ >> lib/libjpeg.a /Users/jma/supplibs/lib/libz.a /Users/jma/supplibs/ >> lib/libhdf5.a /Users/jma/supplibs/lib/libsz.a /Users/jma/supplibs/ >> lib/libjpeg.a /Users/jma/supplibs/lib/libz.a /Users/jma/supplibs/ >> lib/libudunits.a /Users/jma/supplibs/lib/libnetcdf.a /Users/jma/ >> supplibs/lib/libhdf5_hl.a /Users/jma/supplibs/lib/libhdf5.a /Users/ >> jma/supplibs/lib/libz.a /Users/jma/supplibs/lib/libsz.a /Users/jma/ >> supplibs/lib/libcurl.a /Users/jma/supplibs/lib/libtiff.a /Users/ >> jma/supplibs/lib/libgeotiff.a /Users/jma/supplibs/lib/libshp.a -lm >> >> gcc -g -O2 -lSystemStubs -o gfast grads.o gxsubs.o gxmeta.o >> gxchpl.o gxcntr.o gxstrm.o gxwmap.o gxshad.o gxshad2.o gaexpr.o >> gafunc.o gautil.o gagx.o gscrpt.o gamach.o bufrstn.o gabufr.o >> gabufrtbl.o gxX.o gxdxwd.o galloc.o gaddes.o gaio.o gacfg.o >> gauser.o gasdf.o gatxt.o -L/opt/local/lib -lcairo -lX11 /Users/jma/ >> supplibs/lib/libreadline.a /Users/jma/supplibs/lib/libncurses.a / >> Users/jma/supplibs/lib/libgd.a /Users/jma/supplibs/lib/libpng12.a / >> Users/jma/supplibs/lib/libz.a /Users/jma/supplibs/lib/libjpeg.a / >> Users/jma/supplibs/lib/libgrib2c.a /Users/jma/supplibs/lib/ >> libjasper.a /Users/jma/supplibs/lib/libpng12.a /Users/jma/supplibs/ >> lib/libz.a /Users/jma/supplibs/lib/libmfhdf.a /Users/jma/supplibs/ >> lib/libdf.a /Users/jma/supplibs/lib/libudunits.a /Users/jma/ >> supplibs/lib/libsz.a /Users/jma/supplibs/lib/libjpeg.a /Users/jma/ >> supplibs/lib/libz.a /Users/jma/supplibs/lib/libhdf5.a /Users/jma/ >> supplibs/lib/libsz.a /Users/jma/supplibs/lib/libjpeg.a /Users/jma/ >> supplibs/lib/libz.a /Users/jma/supplibs/lib/libudunits.a /Users/jma/ >> supplibs/lib/libnetcdf.a /Users/jma/supplibs/lib/libhdf5_hl.a / >> Users/jma/supplibs/lib/libhdf5.a /Users/jma/supplibs/lib/libz.a / >> Users/jma/supplibs/lib/libsz.a /Users/jma/supplibs/lib/libcurl.a / >> Users/jma/supplibs/lib/libtiff.a /Users/jma/supplibs/lib/ >> libgeotiff.a /Users/jma/supplibs/lib/libshp.a -lm >> >> >> > otool -L gslow >> gslow: >> /Users/jma/supplibs/src/cairo/lib/libcairo.2.dylib >> (compatibility version 11003.0.0, current version 11003.2.0) >> /usr/X11/lib/libX11.6.dylib (compatibility version 9.0.0, >> current version 9.0.0) >> /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, >> current version 111.1.5) >> /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, >> current version 1.0.0) >> > otool -L gfast >> gfast: >> /opt/local/lib/libcairo.2.dylib (compatibility version >> 11003.0.0, current version 11003.0.0) >> /opt/local/lib/libX11.6.dylib (compatibility version >> 10.0.0, current version 10.0.0) >> /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, >> current version 111.1.5) >> /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, >> current version 1.0.0) >> >> >> > cairo-perf-trace gg.88743.trace >> [ # ] backend test min(s) median(s) >> stddev. count >> [ # ] image: pixman 0.21.2 >> [ 0] image gg 0.691 0.696 >> 0.30% 6/6 >> [ # ] image16: pixman 0.21.2 >> [ 0] image16 gg 0.692 0.696 >> 0.21% 6/6 >> >> > > > ------------------------------------------------------------------------------ > Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! > Finally, a world-class log management solution at an even better > price-free! > Download using promo code Free_Logger_4_Dev2Dev. Offer expires > February 28th, so secure your free ArcSight Logger TODAY! > http://p.sf.net/sfu/arcsight-sfd2d > _______________________________________________ > Opengrads-devel mailing list > Ope...@li... > https://lists.sourceforge.net/lists/listinfo/opengrads-devel > > > > > -- > Arlindo da Silva > da...@al... > ------------------------------------------------------------------------------ > Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! > Finally, a world-class log management solution at an even better > price-free! > Download using promo code Free_Logger_4_Dev2Dev. Offer expires > February 28th, so secure your free ArcSight Logger TODAY! > http://p.sf.net/sfu/arcsight-sfd2d_______________________________________________ > Opengrads-devel mailing list > Ope...@li... > https://lists.sourceforge.net/lists/listinfo/opengrads-devel -- Jennifer M. Adams IGES/COLA 4041 Powder Mill Road, Suite 302 Calverton, MD 20705 jm...@co... |
From: Mike F. <mfi...@gm...> - 2011-01-27 01:46:56
|
Hi Jennifer, glad you're making good progress with cairo. The output is very good and that won't be an issue, beyond speed, combining two images with -t and -b in printim is critical to me (like is done with your weather maps). I'd be happy to guinea pig; I run both mac and centos thanks Best /R Mike On Jan 26, 2011, at 8:58, Jennifer Adams <jm...@co...> wrote: > Dear All, > I can get a stand-alone program and GrADS to link statically with my own cairo build on my mac. I'm pretty sure I'll be able to do that on our CentOS boxes as well. That is a big relief, because it means the GrADS distribution method won't have to change. The use of cairo will be handled as an optional feature. Brian and I feel that there should always be a usable version of GrADS that will compile and link without any supplibs at all. > > As for keeping the old printim code, it will be a nuisance to rewrite it to match the new structure of the metafile buffer, and it bloats GrADS, but we can keep it around for backwards compatibility and to avoid widespread panic. I don't think there will be a high demand for printim output after a side by side comparison with the cairo equivalent. > > The new supplibs (so far) are pkg-config, pixman, fontconfig, freetype, Xrender, and cairo. They all build without too much fuss. I will update my supplibs documentation page with all my notes and configure options. I hope that will easily translate into the opengrads supplibs distribution. > >> ps: Can you explain what makes "gfast" be faster than "gslow"? Is this for PNG generation or drawing on the screen? > > gfast was linked dynamically with the macports build of cairo; gslow was linked with my own build that did not use libXrender. Once I added libXrender to my own cairo build, and relinked gslow, it was the same as gfast. All tests were based on drawing to an X window. We don't yet have any cairo code in GrADS to generate image output. > > --Jennifer > > On Jan 24, 2011, at 9:20 PM, Arlindo da Silva wrote: > >> On Fri, Jan 21, 2011 at 12:36 PM, Jennifer Adams <jm...@co...> wrote: >> Dear All, >> I just sent this message to the Cairo forum, but I am copying it here to keep you in the loop regarding my progress with Cairo, and to see if you have any suggestions for how to get me out of the weeds. >> >> Quick Comments: >> >> 1) I've been including cairo in the opengrads releases for a couple of years now and it has work reliably on all platforms, including windows and freebsd. I was a little concerned in the beginning that the growing dependency list for cairo was going to be a nightmare but so far so good. >> >> 2) The current opengrads supplibs include cairo and its dependencies, although I do not do any drawing to the screen at this point. However, it would be simple to enable additional surfaces to support your new features. >> >> 3) Because cairo uses pkg-config, autoconf support is rather trivial (see Patrice's email earlier on). I also include pkg-config in the supplibs and it really helps ensure the consistency of the supplib/grads builds. It would be good if we could jointly maintain this supplib distribution. I got nearly 500 downloads for the latest supplib release I did for 2.0.a9, so I think a lot of people appreciate this semi-binary approach: grads sources, but pre-compiled supplibs. >> >> 4) Most of the opengrads supplibs are in the form of static .a libraries as customary in grads builds. However, in the recent releases of cairo I was not able to have a portable static build across all the platforms (without having to redo the build for cairo and its dependencies). I ended up building cairo as a shared library, and relying on wrapper scripts to ensure the correct shared libraries are linked at run time. I can go over the details and rationale if you are interested, but this mechanism has also improved the robustness of the builds as missing .so are include included in the distribution. (The users have no idea that "grads" is actually a script that points to the real binary down below.) The wrapper script is written in perl except under Windows where I use VBscript. >> >> Let me know if there is anything I can do to help. >> >> Arlindo >> >> ps: Can you explain what makes "gfast" be faster than "gslow"? Is this for PNG generation or drawing on the screen? >> >> >> >> >> >> >> --Jennifer >> >> >> Begin forwarded message: >> >>> From: Jennifer Adams <jm...@co...> >>> Date: January 21, 2011 12:31:50 PM EST >>> To: cairo <ca...@ca...> >>> Subject: Issues with Store-Bought v. Home-Grown builds of Cairo >>> >>> Dear Experts, >>> >>> I apologize in advance for a long email ... I'm just trying to be thorough. The bottom line is my own build of Cairo compared with the macports/yum build is MUCH too slow, and I don't know why. >>> >>> I am working toward getting Cairo to handle all the graphics for GrADS, an open-source program for the analysis and display of meteorological data. The old way of doing graphics in GrADS was a combination of direct calls to the X11 library (for the X window interface), calls to the gd library (for image output), plus some extremely dated code to create postscript output. All text was drawn in Hershey fonts. Cairo improves on this mish-mash in so many ways; the graphics are looking absolutely fantastic, the toy font API is adequate for our needs, and I know my users are going to be very excited when they see these improvements. >>> >>> For GrADS distribution, I provide binary executables for a small set of platforms, but many users must build from source. GrADS requires a long list of supplemental libraries to fully enable all its features: the current count is 20. With the exception of X11 and a few other system libs, we link statically with all these supplibs, so that our binaries are portable (some of the supplibs GrADS needs are rather obscure.) I get the impression from browsing through the forum archives that linking statically with Cairo isn't really the right way to do it, so during my development and testing I have been linking dynamically with a macports build of Cairo. It's been fine that way, a little slower than the old way of using direct X11 calls, but not deal-breakingly slow. >>> >>> Looking forward to the time when I must put out a release, I am trying to integrate Cairo into the GrADS autoconfiguration scripts and the setup we have for building all the supplibs from source. I can't assume that all my users will have macports or yum to do the dirty work for them, so I provide a set of instructions to build the libraries from source and link them with GrADS. It is something like the end-to-end build instructions on the Cairo website. I try to keep it as simple as possible, and tailor these instructions for the specific needs of GrADS. >>> >>> Testing out my home-grown Cairo recipe, it built without any problems (specifics given below). Then I linked GrADS two ways, one with the macports build (gfast), the other with my home-grown build (gslow). More specifics on how I linked the executables and output from otool are given below. The performance difference between glsow v. gfast is astonishing. Where gfast took 1-2 seconds to draw a plot, gslow took ~100 seconds to do the same thing. I reran all these steps on our 64-bit linux server running CentOS 5.4 and got similar results. >>> >>> Thanks to earlier answers I got regarding getting cairo-trace to work, I created a huge trace file, but I'm not sure how to interpret it. It contained ~77,000 fills and ~10,000 strokes. I reran cairo-trace with the --profile option and posted it at ftp://iges.org/pub/jma/gs.89039.lzma . The output from running cairo-perf-trace on my trace file is given below. I have no idea whether the trace info is helpful. >>> >>> What I could use is some advice about linking statically v. dynamically for my binary distributions, and some guidance for how to build Cairo from source (with only as-needed features) and link it with my application so that I get the same performance as the carefully packaged, fully-enabled versions of Cairo. >>> >>> Thank you!! >>> --Jennifer >>> >>> >>> >>> -- >>> Jennifer M. Adams >>> IGES/COLA >>> 4041 Powder Mill Road, Suite 302 >>> Calverton, MD 20705 >>> jm...@co... >>> >>> >>> >>> OS X version 10.5.8 >>> >>> > uname -a >>> Darwin Atlantic-2.local 9.8.0 Darwin Kernel Version 9.8.0: Wed Jul 15 16:55:01 PDT 2009; root:xnu-1228.15.4~1/RELEASE_I386 i386 >>> >>> > gcc --version >>> i686-apple-darwin9-gcc-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5490) >>> >>> >>> Configuration options used to build cairo from source: >>> pkg-config-0.23 >>> (I then set the environment vars PKG_CONFIG and PKG_CONFIG_PATH to the appropriate places) >>> pixman-0.21.2 >>> freetype-2.4.3 --without-fsspec --without-fsref --without-ats --without-quickdraw-toolbox --without-quickdraw-carbon >>> fontconfig-2.8.0 --enable-libxml2 --with-freetype-config=... >>> cairo-1.10.2 --disable-dependency-tracking \ >>> --enable-xlib=yes \ >>> --enable-xml=yes \ >>> --enable-fc=yes \ >>> --enable-ft=yes \ >>> --enable-xlib-xrender=no \ >>> --enable-xcb=no \ >>> --enable-qt=no \ >>> --enable-quartz=no \ >>> --enable-win32=no \ >>> --enable-skia=no \ >>> --enable-os2=no \ >>> --enable-beos=no \ >>> --enable-drm=no \ >>> --enable-pthread \ >>> --enable-gl=no >>> >>> >>> Linking commands used to build gfast and gslow (relevant bits highlighed in red): >>> >>> gcc -g -O2 -lSystemStubs -o gslow grads.o gxsubs.o gxmeta.o gxchpl.o gxcntr.o gxstrm.o gxwmap.o gxshad.o gxshad2.o gaexpr.o gafunc.o gautil.o gagx.o gscrpt.o gamach.o bufrstn.o gabufr.o gabufrtbl.o gxX.o gxdxwd.o galloc.o gaddes.o gaio.o gacfg.o gauser.o gasdf.o gatxt.o -L/Users/jma/supplibs/lib -lcairo -L/usr/X11R6/lib -lX11 /Users/jma/supplibs/lib/libreadline.a /Users/jma/supplibs/lib/libncurses.a /Users/jma/supplibs/lib/libgd.a /Users/jma/supplibs/lib/libpng12.a /Users/jma/supplibs/lib/libz.a /Users/jma/supplibs/lib/libjpeg.a /Users/jma/supplibs/lib/libgrib2c.a /Users/jma/supplibs/lib/libjasper.a /Users/jma/supplibs/lib/libpng12.a /Users/jma/supplibs/lib/libz.a /Users/jma/supplibs/lib/libmfhdf.a /Users/jma/supplibs/lib/libdf.a /Users/jma/supplibs/lib/libudunits.a /Users/jma/supplibs/lib/libsz.a /Users/jma/supplibs/lib/libjpeg.a /Users/jma/supplibs/lib/libz.a /Users/jma/supplibs/lib/libhdf5.a /Users/jma/supplibs/lib/libsz.a /Users/jma/supplibs/lib/libjpeg.a /Users/jma/supplibs/lib/libz.a /Users/jma/supplibs/lib/libudunits.a /Users/jma/supplibs/lib/libnetcdf.a /Users/jma/supplibs/lib/libhdf5_hl.a /Users/jma/supplibs/lib/libhdf5.a /Users/jma/supplibs/lib/libz.a /Users/jma/supplibs/lib/libsz.a /Users/jma/supplibs/lib/libcurl.a /Users/jma/supplibs/lib/libtiff.a /Users/jma/supplibs/lib/libgeotiff.a /Users/jma/supplibs/lib/libshp.a -lm >>> >>> gcc -g -O2 -lSystemStubs -o gfast grads.o gxsubs.o gxmeta.o gxchpl.o gxcntr.o gxstrm.o gxwmap.o gxshad.o gxshad2.o gaexpr.o gafunc.o gautil.o gagx.o gscrpt.o gamach.o bufrstn.o gabufr.o gabufrtbl.o gxX.o gxdxwd.o galloc.o gaddes.o gaio.o gacfg.o gauser.o gasdf.o gatxt.o -L/opt/local/lib -lcairo -lX11 /Users/jma/supplibs/lib/libreadline.a /Users/jma/supplibs/lib/libncurses.a /Users/jma/supplibs/lib/libgd.a /Users/jma/supplibs/lib/libpng12.a /Users/jma/supplibs/lib/libz.a /Users/jma/supplibs/lib/libjpeg.a /Users/jma/supplibs/lib/libgrib2c.a /Users/jma/supplibs/lib/libjasper.a /Users/jma/supplibs/lib/libpng12.a /Users/jma/supplibs/lib/libz.a /Users/jma/supplibs/lib/libmfhdf.a /Users/jma/supplibs/lib/libdf.a /Users/jma/supplibs/lib/libudunits.a /Users/jma/supplibs/lib/libsz.a /Users/jma/supplibs/lib/libjpeg.a /Users/jma/supplibs/lib/libz.a /Users/jma/supplibs/lib/libhdf5.a /Users/jma/supplibs/lib/libsz.a /Users/jma/supplibs/lib/libjpeg.a /Users/jma/supplibs/lib/libz.a /Users/jma/supplibs/lib/libudunits.a /Users/jma/supplibs/lib/libnetcdf.a /Users/jma/supplibs/lib/libhdf5_hl.a /Users/jma/supplibs/lib/libhdf5.a /Users/jma/supplibs/lib/libz.a /Users/jma/supplibs/lib/libsz.a /Users/jma/supplibs/lib/libcurl.a /Users/jma/supplibs/lib/libtiff.a /Users/jma/supplibs/lib/libgeotiff.a /Users/jma/supplibs/lib/libshp.a -lm >>> >>> >>> > otool -L gslow >>> gslow: >>> /Users/jma/supplibs/src/cairo/lib/libcairo.2.dylib (compatibility version 11003.0.0, current version 11003.2.0) >>> /usr/X11/lib/libX11.6.dylib (compatibility version 9.0.0, current version 9.0.0) >>> /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 111.1.5) >>> /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0) >>> > otool -L gfast >>> gfast: >>> /opt/local/lib/libcairo.2.dylib (compatibility version 11003.0.0, current version 11003.0.0) >>> /opt/local/lib/libX11.6.dylib (compatibility version 10.0.0, current version 10.0.0) >>> /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 111.1.5) >>> /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0) >>> >>> >>> > cairo-perf-trace gg.88743.trace >>> [ # ] backend test min(s) median(s) stddev. count >>> [ # ] image: pixman 0.21.2 >>> [ 0] image gg 0.691 0.696 0.30% 6/6 >>> [ # ] image16: pixman 0.21.2 >>> [ 0] image16 gg 0.692 0.696 0.21% 6/6 >>> >>> >> >> >> ------------------------------------------------------------------------------ >> Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! >> Finally, a world-class log management solution at an even better price-free! >> Download using promo code Free_Logger_4_Dev2Dev. Offer expires >> February 28th, so secure your free ArcSight Logger TODAY! >> http://p.sf.net/sfu/arcsight-sfd2d >> _______________________________________________ >> Opengrads-devel mailing list >> Ope...@li... >> https://lists.sourceforge.net/lists/listinfo/opengrads-devel >> >> >> >> >> -- >> Arlindo da Silva >> da...@al... >> ------------------------------------------------------------------------------ >> Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! >> Finally, a world-class log management solution at an even better price-free! >> Download using promo code Free_Logger_4_Dev2Dev. Offer expires >> February 28th, so secure your free ArcSight Logger TODAY! >> http://p.sf.net/sfu/arcsight-sfd2d_______________________________________________ >> Opengrads-devel mailing list >> Ope...@li... >> https://lists.sourceforge.net/lists/listinfo/opengrads-devel > > -- > Jennifer M. Adams > IGES/COLA > 4041 Powder Mill Road, Suite 302 > Calverton, MD 20705 > jm...@co... > > > > ------------------------------------------------------------------------------ > Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! > Finally, a world-class log management solution at an even better price-free! > Download using promo code Free_Logger_4_Dev2Dev. Offer expires > February 28th, so secure your free ArcSight Logger TODAY! > http://p.sf.net/sfu/arcsight-sfd2d > _______________________________________________ > Opengrads-devel mailing list > Ope...@li... > https://lists.sourceforge.net/lists/listinfo/opengrads-devel |
From: Love, M. G. C. C. 7. <gar...@nr...> - 2011-01-22 09:15:32
|
Hi Jennifer, I like the sound of improved graphics, but even gfast will not be fast enough. The current X11 library version generates a plot in 200-300 milliseconds, 5 times faster. GrADS' current speed is one of its best features which has always been very important to NRL and FNMOC, since our post processing for just one project already takes 30 minutes because so many plots are needed. I hope newer versions of GrADS can still be compiled with the X11 libs. Gary ________________________________ From: Jennifer Adams [mailto:jm...@co...] Sent: Friday, January 21, 2011 9:36 AM To: ope...@li... Cc: Brian Doty Subject: [Opengrads-devel] Fwd: Issues with Store-Bought v. Home-Grown builds of Cairo Dear All, I just sent this message to the Cairo forum, but I am copying it here to keep you in the loop regarding my progress with Cairo, and to see if you have any suggestions for how to get me out of the weeds. --Jennifer Begin forwarded message: From: Jennifer Adams <jm...@co...<mailto:jm...@co...>> Date: January 21, 2011 12:31:50 PM EST To: cairo <ca...@ca...<mailto:ca...@ca...>> Subject: Issues with Store-Bought v. Home-Grown builds of Cairo Dear Experts, I apologize in advance for a long email ... I'm just trying to be thorough. The bottom line is my own build of Cairo compared with the macports/yum build is MUCH too slow, and I don't know why. I am working toward getting Cairo to handle all the graphics for GrADS, an open-source program for the analysis and display of meteorological data. The old way of doing graphics in GrADS was a combination of direct calls to the X11 library (for the X window interface), calls to the gd library (for image output), plus some extremely dated code to create postscript output. All text was drawn in Hershey fonts. Cairo improves on this mish-mash in so many ways; the graphics are looking absolutely fantastic, the toy font API is adequate for our needs, and I know my users are going to be very excited when they see these improvements. For GrADS distribution, I provide binary executables for a small set of platforms, but many users must build from source. GrADS requires a long list of supplemental libraries to fully enable all its features: the current count is 20. With the exception of X11 and a few other system libs, we link statically with all these supplibs, so that our binaries are portable (some of the supplibs GrADS needs are rather obscure.) I get the impression from browsing through the forum archives that linking statically with Cairo isn't really the right way to do it, so during my development and testing I have been linking dynamically with a macports build of Cairo. It's been fine that way, a little slower than the old way of using direct X11 calls, but not deal-breakingly slow. Looking forward to the time when I must put out a release, I am trying to integrate Cairo into the GrADS autoconfiguration scripts and the setup we have for building all the supplibs from source. I can't assume that all my users will have macports or yum to do the dirty work for them, so I provide a set of instructions to build the libraries from source and link them with GrADS. It is something like the end-to-end build instructions on the Cairo website. I try to keep it as simple as possible, and tailor these instructions for the specific needs of GrADS. Testing out my home-grown Cairo recipe, it built without any problems (specifics given below). Then I linked GrADS two ways, one with the macports build (gfast), the other with my home-grown build (gslow). More specifics on how I linked the executables and output from otool are given below. The performance difference between glsow v. gfast is astonishing. Where gfast took 1-2 seconds to draw a plot, gslow took ~100 seconds to do the same thing. I reran all these steps on our 64-bit linux server running CentOS 5.4 and got similar results. Thanks to earlier answers I got regarding getting cairo-trace to work, I created a huge trace file, but I'm not sure how to interpret it. It contained ~77,000 fills and ~10,000 strokes. I reran cairo-trace with the --profile option and posted it at ftp://iges.org/pub/jma/gs.89039.lzma . The output from running cairo-perf-trace on my trace file is given below. I have no idea whether the trace info is helpful. What I could use is some advice about linking statically v. dynamically for my binary distributions, and some guidance for how to build Cairo from source (with only as-needed features) and link it with my application so that I get the same performance as the carefully packaged, fully-enabled versions of Cairo. Thank you!! --Jennifer -- Jennifer M. Adams IGES/COLA 4041 Powder Mill Road, Suite 302 Calverton, MD 20705 jm...@co...<mailto:jm...@co...> OS X version 10.5.8 > uname -a Darwin Atlantic-2.local 9.8.0 Darwin Kernel Version 9.8.0: Wed Jul 15 16:55:01 PDT 2009; root:xnu-1228.15.4~1/RELEASE_I386 i386 > gcc --version i686-apple-darwin9-gcc-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5490) Configuration options used to build cairo from source: pkg-config-0.23 (I then set the environment vars PKG_CONFIG and PKG_CONFIG_PATH to the appropriate places) pixman-0.21.2 freetype-2.4.3 --without-fsspec --without-fsref --without-ats --without-quickdraw-toolbox --without-quickdraw-carbon fontconfig-2.8.0 --enable-libxml2 --with-freetype-config=... cairo-1.10.2 --disable-dependency-tracking \ --enable-xlib=yes \ --enable-xml=yes \ --enable-fc=yes \ --enable-ft=yes \ --enable-xlib-xrender=no \ --enable-xcb=no \ --enable-qt=no \ --enable-quartz=no \ --enable-win32=no \ --enable-skia=no \ --enable-os2=no \ --enable-beos=no \ --enable-drm=no \ --enable-pthread \ --enable-gl=no Linking commands used to build gfast and gslow (relevant bits highlighed in red): gcc -g -O2 -lSystemStubs -o gslow grads.o gxsubs.o gxmeta.o gxchpl.o gxcntr.o gxstrm.o gxwmap.o gxshad.o gxshad2.o gaexpr.o gafunc.o gautil.o gagx.o gscrpt.o gamach.o bufrstn.o gabufr.o gabufrtbl.o gxX.o gxdxwd.o galloc.o gaddes.o gaio.o gacfg.o gauser.o gasdf.o gatxt.o -L/Users/jma/supplibs/lib -lcairo -L/usr/X11R6/lib -lX11 /Users/jma/supplibs/lib/libreadline.a /Users/jma/supplibs/lib/libncurses.a /Users/jma/supplibs/lib/libgd.a /Users/jma/supplibs/lib/libpng12.a /Users/jma/supplibs/lib/libz.a /Users/jma/supplibs/lib/libjpeg.a /Users/jma/supplibs/lib/libgrib2c.a /Users/jma/supplibs/lib/libjasper.a /Users/jma/supplibs/lib/libpng12.a /Users/jma/supplibs/lib/libz.a /Users/jma/supplibs/lib/libmfhdf.a /Users/jma/supplibs/lib/libdf.a /Users/jma/supplibs/lib/libudunits.a /Users/jma/supplibs/lib/libsz.a /Users/jma/supplibs/lib/libjpeg.a /Users/jma/supplibs/lib/libz.a /Users/jma/supplibs/lib/libhdf5.a /Users/jma/supplibs/lib/libsz.a /Users/jma/supplibs/lib/libjpeg.a /Users/jma/supplibs/lib/libz.a /Users/jma/supplibs/lib/libudunits.a /Users/jma/supplibs/lib/libnetcdf.a /Users/jma/supplibs/lib/libhdf5_hl.a /Users/jma/supplibs/lib/libhdf5.a /Users/jma/supplibs/lib/libz.a /Users/jma/supplibs/lib/libsz.a /Users/jma/supplibs/lib/libcurl.a /Users/jma/supplibs/lib/libtiff.a /Users/jma/supplibs/lib/libgeotiff.a /Users/jma/supplibs/lib/libshp.a -lm gcc -g -O2 -lSystemStubs -o gfast grads.o gxsubs.o gxmeta.o gxchpl.o gxcntr.o gxstrm.o gxwmap.o gxshad.o gxshad2.o gaexpr.o gafunc.o gautil.o gagx.o gscrpt.o gamach.o bufrstn.o gabufr.o gabufrtbl.o gxX.o gxdxwd.o galloc.o gaddes.o gaio.o gacfg.o gauser.o gasdf.o gatxt.o -L/opt/local/lib -lcairo -lX11 /Users/jma/supplibs/lib/libreadline.a /Users/jma/supplibs/lib/libncurses.a /Users/jma/supplibs/lib/libgd.a /Users/jma/supplibs/lib/libpng12.a /Users/jma/supplibs/lib/libz.a /Users/jma/supplibs/lib/libjpeg.a /Users/jma/supplibs/lib/libgrib2c.a /Users/jma/supplibs/lib/libjasper.a /Users/jma/supplibs/lib/libpng12.a /Users/jma/supplibs/lib/libz.a /Users/jma/supplibs/lib/libmfhdf.a /Users/jma/supplibs/lib/libdf.a /Users/jma/supplibs/lib/libudunits.a /Users/jma/supplibs/lib/libsz.a /Users/jma/supplibs/lib/libjpeg.a /Users/jma/supplibs/lib/libz.a /Users/jma/supplibs/lib/libhdf5.a /Users/jma/supplibs/lib/libsz.a /Users/jma/supplibs/lib/libjpeg.a /Users/jma/supplibs/lib/libz.a /Users/jma/supplibs/lib/libudunits.a /Users/jma/supplibs/lib/libnetcdf.a /Users/jma/supplibs/lib/libhdf5_hl.a /Users/jma/supplibs/lib/libhdf5.a /Users/jma/supplibs/lib/libz.a /Users/jma/supplibs/lib/libsz.a /Users/jma/supplibs/lib/libcurl.a /Users/jma/supplibs/lib/libtiff.a /Users/jma/supplibs/lib/libgeotiff.a /Users/jma/supplibs/lib/libshp.a -lm > otool -L gslow gslow: /Users/jma/supplibs/src/cairo/lib/libcairo.2.dylib (compatibility version 11003.0.0, current version 11003.2.0) /usr/X11/lib/libX11.6.dylib (compatibility version 9.0.0, current version 9.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 111.1.5) /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0) > otool -L gfast gfast: /opt/local/lib/libcairo.2.dylib (compatibility version 11003.0.0, current version 11003.0.0) /opt/local/lib/libX11.6.dylib (compatibility version 10.0.0, current version 10.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 111.1.5) /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0) > cairo-perf-trace gg.88743.trace [ # ] backend test min(s) median(s) stddev. count [ # ] image: pixman 0.21.2 [ 0] image gg 0.691 0.696 0.30% 6/6 [ # ] image16: pixman 0.21.2 [ 0] image16 gg 0.692 0.696 0.21% 6/6 |
From: Brian D. <do...@co...> - 2011-01-22 13:46:03
|
Hi Gary, performance is a high priority. We depend on grads' performance in many ways. So we plan on maintaining a "native" X interface, similar to what exists in grads now. None of the new functionality would be available when the "native" interface is being used. But the performance should be essentially the same as is the case currently. Do you do all your graphics through X? Or do you also use printim? We are currently planning to drop the GD library in favor of Cairo for image production, and that would be a loss of performance. We gain anti-aliasing, raster fonts, and transparency. We are not sure as yet of the performance implications; if significant we may need to keep the GD interface around. We are still figuring these things out. Unfortunately we are finding that Cairo performance characteristics are platform dependent.... Brian On Jan 22, 2011, at 4:01 AM, Love, Mr. Gary, Contractor, Code 7542 wrote: > Hi Jennifer, > > I like the sound of improved graphics, but even gfast will not be > fast enough. The current X11 library version generates a plot in > 200-300 milliseconds, 5 times faster. GrADS' current speed is one > of its best features which has always been very important to NRL and > FNMOC, since our post processing for just one project already takes > 30 minutes because so many plots are needed. > > I hope newer versions of GrADS can still be compiled with the X11 > libs. > > Gary > > From: Jennifer Adams [mailto:jm...@co...] > Sent: Friday, January 21, 2011 9:36 AM > To: ope...@li... > Cc: Brian Doty > Subject: [Opengrads-devel] Fwd: Issues with Store-Bought v. Home- > Grown builds of Cairo > > Dear All, > I just sent this message to the Cairo forum, but I am copying it > here to keep you in the loop regarding my progress with Cairo, and > to see if you have any suggestions for how to get me out of the weeds. > --Jennifer > > > Begin forwarded message: > >> From: Jennifer Adams <jm...@co...> >> Date: January 21, 2011 12:31:50 PM EST >> To: cairo <ca...@ca...> >> Subject: Issues with Store-Bought v. Home-Grown builds of Cairo >> >> Dear Experts, >> >> I apologize in advance for a long email ... I'm just trying to be >> thorough. The bottom line is my own build of Cairo compared with >> the macports/yum build is MUCH too slow, and I don't know why. >> >> I am working toward getting Cairo to handle all the graphics for >> GrADS, an open-source program for the analysis and display of >> meteorological data. The old way of doing graphics in GrADS was a >> combination of direct calls to the X11 library (for the X window >> interface), calls to the gd library (for image output), plus some >> extremely dated code to create postscript output. All text was >> drawn in Hershey fonts. Cairo improves on this mish-mash in so many >> ways; the graphics are looking absolutely fantastic, the toy font >> API is adequate for our needs, and I know my users are going to be >> very excited when they see these improvements. >> >> For GrADS distribution, I provide binary executables for a small >> set of platforms, but many users must build from source. GrADS >> requires a long list of supplemental libraries to fully enable all >> its features: the current count is 20. With the exception of X11 >> and a few other system libs, we link statically with all these >> supplibs, so that our binaries are portable (some of the supplibs >> GrADS needs are rather obscure.) I get the impression from browsing >> through the forum archives that linking statically with Cairo isn't >> really the right way to do it, so during my development and testing >> I have been linking dynamically with a macports build of Cairo. >> It's been fine that way, a little slower than the old way of using >> direct X11 calls, but not deal-breakingly slow. >> >> Looking forward to the time when I must put out a release, I am >> trying to integrate Cairo into the GrADS autoconfiguration scripts >> and the setup we have for building all the supplibs from source. I >> can't assume that all my users will have macports or yum to do the >> dirty work for them, so I provide a set of instructions to build >> the libraries from source and link them with GrADS. It is something >> like the end-to-end build instructions on the Cairo website. I try >> to keep it as simple as possible, and tailor these instructions for >> the specific needs of GrADS. >> >> Testing out my home-grown Cairo recipe, it built without any >> problems (specifics given below). Then I linked GrADS two ways, one >> with the macports build (gfast), the other with my home-grown build >> (gslow). More specifics on how I linked the executables and output >> from otool are given below. The performance difference between >> glsow v. gfast is astonishing. Where gfast took 1-2 seconds to draw >> a plot, gslow took ~100 seconds to do the same thing. I reran all >> these steps on our 64-bit linux server running CentOS 5.4 and got >> similar results. >> >> Thanks to earlier answers I got regarding getting cairo-trace to >> work, I created a huge trace file, but I'm not sure how to >> interpret it. It contained ~77,000 fills and ~10,000 strokes. I >> reran cairo-trace with the --profile option and posted it at ftp://iges.org/pub/jma/gs.89039.lzma >> . The output from running cairo-perf-trace on my trace file is >> given below. I have no idea whether the trace info is helpful. >> >> What I could use is some advice about linking statically v. >> dynamically for my binary distributions, and some guidance for how >> to build Cairo from source (with only as-needed features) and >> link it with my application so that I get the same performance as >> the carefully packaged, fully-enabled versions of Cairo. >> >> Thank you!! >> --Jennifer >> >> >> >> -- >> Jennifer M. Adams >> IGES/COLA >> 4041 Powder Mill Road, Suite 302 >> Calverton, MD 20705 >> jm...@co... >> >> >> >> OS X version 10.5.8 >> >> > uname -a >> Darwin Atlantic-2.local 9.8.0 Darwin Kernel Version 9.8.0: Wed Jul >> 15 16:55:01 PDT 2009; root:xnu-1228.15.4~1/RELEASE_I386 i386 >> >> > gcc --version >> i686-apple-darwin9-gcc-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5490) >> >> >> Configuration options used to build cairo from source: >> pkg-config-0.23 >> (I then set the environment vars PKG_CONFIG and PKG_CONFIG_PATH to >> the appropriate places) >> pixman-0.21.2 >> freetype-2.4.3 --without-fsspec --without-fsref --without-ats -- >> without-quickdraw-toolbox --without-quickdraw-carbon >> fontconfig-2.8.0 --enable-libxml2 --with-freetype-config=... >> cairo-1.10.2 --disable-dependency-tracking \ >> --enable-xlib=yes \ >> --enable-xml=yes \ >> --enable-fc=yes \ >> --enable-ft=yes \ >> --enable-xlib-xrender=no \ >> --enable-xcb=no \ >> --enable-qt=no \ >> --enable-quartz=no \ >> --enable-win32=no \ >> --enable-skia=no \ >> --enable-os2=no \ >> --enable-beos=no \ >> --enable-drm=no \ >> --enable-pthread \ >> --enable-gl=no >> >> >> Linking commands used to build gfast and gslow (relevant bits >> highlighed in red): >> >> gcc -g -O2 -lSystemStubs -o gslow grads.o gxsubs.o gxmeta.o >> gxchpl.o gxcntr.o gxstrm.o gxwmap.o gxshad.o gxshad2.o gaexpr.o >> gafunc.o gautil.o gagx.o gscrpt.o gamach.o bufrstn.o gabufr.o >> gabufrtbl.o gxX.o gxdxwd.o galloc.o gaddes.o gaio.o gacfg.o >> gauser.o gasdf.o gatxt.o -L/Users/jma/supplibs/lib -lcairo -L/usr/ >> X11R6/lib -lX11 /Users/jma/supplibs/lib/libreadline.a /Users/jma/ >> supplibs/lib/libncurses.a /Users/jma/supplibs/lib/libgd.a /Users/ >> jma/supplibs/lib/libpng12.a /Users/jma/supplibs/lib/libz.a /Users/ >> jma/supplibs/lib/libjpeg.a /Users/jma/supplibs/lib/libgrib2c.a / >> Users/jma/supplibs/lib/libjasper.a /Users/jma/supplibs/lib/ >> libpng12.a /Users/jma/supplibs/lib/libz.a /Users/jma/supplibs/lib/ >> libmfhdf.a /Users/jma/supplibs/lib/libdf.a /Users/jma/supplibs/lib/ >> libudunits.a /Users/jma/supplibs/lib/libsz.a /Users/jma/supplibs/ >> lib/libjpeg.a /Users/jma/supplibs/lib/libz.a /Users/jma/supplibs/ >> lib/libhdf5.a /Users/jma/supplibs/lib/libsz.a /Users/jma/supplibs/ >> lib/libjpeg.a /Users/jma/supplibs/lib/libz.a /Users/jma/supplibs/ >> lib/libudunits.a /Users/jma/supplibs/lib/libnetcdf.a /Users/jma/ >> supplibs/lib/libhdf5_hl.a /Users/jma/supplibs/lib/libhdf5.a /Users/ >> jma/supplibs/lib/libz.a /Users/jma/supplibs/lib/libsz.a /Users/jma/ >> supplibs/lib/libcurl.a /Users/jma/supplibs/lib/libtiff.a /Users/ >> jma/supplibs/lib/libgeotiff.a /Users/jma/supplibs/lib/libshp.a -lm >> >> gcc -g -O2 -lSystemStubs -o gfast grads.o gxsubs.o gxmeta.o >> gxchpl.o gxcntr.o gxstrm.o gxwmap.o gxshad.o gxshad2.o gaexpr.o >> gafunc.o gautil.o gagx.o gscrpt.o gamach.o bufrstn.o gabufr.o >> gabufrtbl.o gxX.o gxdxwd.o galloc.o gaddes.o gaio.o gacfg.o >> gauser.o gasdf.o gatxt.o -L/opt/local/lib -lcairo -lX11 /Users/jma/ >> supplibs/lib/libreadline.a /Users/jma/supplibs/lib/libncurses.a / >> Users/jma/supplibs/lib/libgd.a /Users/jma/supplibs/lib/libpng12.a / >> Users/jma/supplibs/lib/libz.a /Users/jma/supplibs/lib/libjpeg.a / >> Users/jma/supplibs/lib/libgrib2c.a /Users/jma/supplibs/lib/ >> libjasper.a /Users/jma/supplibs/lib/libpng12.a /Users/jma/supplibs/ >> lib/libz.a /Users/jma/supplibs/lib/libmfhdf.a /Users/jma/supplibs/ >> lib/libdf.a /Users/jma/supplibs/lib/libudunits.a /Users/jma/ >> supplibs/lib/libsz.a /Users/jma/supplibs/lib/libjpeg.a /Users/jma/ >> supplibs/lib/libz.a /Users/jma/supplibs/lib/libhdf5.a /Users/jma/ >> supplibs/lib/libsz.a /Users/jma/supplibs/lib/libjpeg.a /Users/jma/ >> supplibs/lib/libz.a /Users/jma/supplibs/lib/libudunits.a /Users/jma/ >> supplibs/lib/libnetcdf.a /Users/jma/supplibs/lib/libhdf5_hl.a / >> Users/jma/supplibs/lib/libhdf5.a /Users/jma/supplibs/lib/libz.a / >> Users/jma/supplibs/lib/libsz.a /Users/jma/supplibs/lib/libcurl.a / >> Users/jma/supplibs/lib/libtiff.a /Users/jma/supplibs/lib/ >> libgeotiff.a /Users/jma/supplibs/lib/libshp.a -lm >> >> >> > otool -L gslow >> gslow: >> /Users/jma/supplibs/src/cairo/lib/libcairo.2.dylib >> (compatibility version 11003.0.0, current version 11003.2.0) >> /usr/X11/lib/libX11.6.dylib (compatibility version 9.0.0, >> current version 9.0.0) >> /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, >> current version 111.1.5) >> /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, >> current version 1.0.0) >> > otool -L gfast >> gfast: >> /opt/local/lib/libcairo.2.dylib (compatibility version >> 11003.0.0, current version 11003.0.0) >> /opt/local/lib/libX11.6.dylib (compatibility version >> 10.0.0, current version 10.0.0) >> /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, >> current version 111.1.5) >> /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, >> current version 1.0.0) >> >> >> > cairo-perf-trace gg.88743.trace >> [ # ] backend test min(s) median(s) >> stddev. count >> [ # ] image: pixman 0.21.2 >> [ 0] image gg 0.691 0.696 >> 0.30% 6/6 >> [ # ] image16: pixman 0.21.2 >> [ 0] image16 gg 0.692 0.696 >> 0.21% 6/6 >> >> > |
From: Jennifer A. <jm...@co...> - 2011-01-22 13:48:40
|
Hi, Gary -- Don't worry, maintaining the performance level of GrADS is important to me and Brian too. We are keeping the old X11 drawing code, so you can switch back to the old way of drawing to the X window if you want to by using a 'set' command. As for the image rendering in batch mode, I have no idea at this time whether cairo will be slower than gd. We haven't got there yet because of the necessary wholesale changes to the metafile structure. And if, in the end, you're unhappy with the speed of Cairo graphics, you will always have the option to stick with version 2.0. --Jennifer p.s. Got some advice back from the Cairo forum: If I build Cairo with libXrender enabled, the intolerable slowness goes away. And static linking should be okay, although I haven't got it working yet. On Jan 22, 2011, at 4:01 AM, Love, Mr. Gary, Contractor, Code 7542 wrote: > Hi Jennifer, > > I like the sound of improved graphics, but even gfast will not be > fast enough. The current X11 library version generates a plot in > 200-300 milliseconds, 5 times faster. GrADS' current speed is one > of its best features which has always been very important to NRL and > FNMOC, since our post processing for just one project already takes > 30 minutes because so many plots are needed. > > I hope newer versions of GrADS can still be compiled with the X11 > libs. > > Gary > > From: Jennifer Adams [mailto:jm...@co...] > Sent: Friday, January 21, 2011 9:36 AM > To: ope...@li... > Cc: Brian Doty > Subject: [Opengrads-devel] Fwd: Issues with Store-Bought v. Home- > Grown builds of Cairo > > Dear All, > I just sent this message to the Cairo forum, but I am copying it > here to keep you in the loop regarding my progress with Cairo, and > to see if you have any suggestions for how to get me out of the weeds. > --Jennifer > > > Begin forwarded message: > >> From: Jennifer Adams <jm...@co...> >> Date: January 21, 2011 12:31:50 PM EST >> To: cairo <ca...@ca...> >> Subject: Issues with Store-Bought v. Home-Grown builds of Cairo >> >> Dear Experts, >> >> I apologize in advance for a long email ... I'm just trying to be >> thorough. The bottom line is my own build of Cairo compared with >> the macports/yum build is MUCH too slow, and I don't know why. >> >> I am working toward getting Cairo to handle all the graphics for >> GrADS, an open-source program for the analysis and display of >> meteorological data. The old way of doing graphics in GrADS was a >> combination of direct calls to the X11 library (for the X window >> interface), calls to the gd library (for image output), plus some >> extremely dated code to create postscript output. All text was >> drawn in Hershey fonts. Cairo improves on this mish-mash in so many >> ways; the graphics are looking absolutely fantastic, the toy font >> API is adequate for our needs, and I know my users are going to be >> very excited when they see these improvements. >> >> For GrADS distribution, I provide binary executables for a small >> set of platforms, but many users must build from source. GrADS >> requires a long list of supplemental libraries to fully enable all >> its features: the current count is 20. With the exception of X11 >> and a few other system libs, we link statically with all these >> supplibs, so that our binaries are portable (some of the supplibs >> GrADS needs are rather obscure.) I get the impression from browsing >> through the forum archives that linking statically with Cairo isn't >> really the right way to do it, so during my development and testing >> I have been linking dynamically with a macports build of Cairo. >> It's been fine that way, a little slower than the old way of using >> direct X11 calls, but not deal-breakingly slow. >> >> Looking forward to the time when I must put out a release, I am >> trying to integrate Cairo into the GrADS autoconfiguration scripts >> and the setup we have for building all the supplibs from source. I >> can't assume that all my users will have macports or yum to do the >> dirty work for them, so I provide a set of instructions to build >> the libraries from source and link them with GrADS. It is something >> like the end-to-end build instructions on the Cairo website. I try >> to keep it as simple as possible, and tailor these instructions for >> the specific needs of GrADS. >> >> Testing out my home-grown Cairo recipe, it built without any >> problems (specifics given below). Then I linked GrADS two ways, one >> with the macports build (gfast), the other with my home-grown build >> (gslow). More specifics on how I linked the executables and output >> from otool are given below. The performance difference between >> glsow v. gfast is astonishing. Where gfast took 1-2 seconds to draw >> a plot, gslow took ~100 seconds to do the same thing. I reran all >> these steps on our 64-bit linux server running CentOS 5.4 and got >> similar results. >> >> Thanks to earlier answers I got regarding getting cairo-trace to >> work, I created a huge trace file, but I'm not sure how to >> interpret it. It contained ~77,000 fills and ~10,000 strokes. I >> reran cairo-trace with the --profile option and posted it at ftp://iges.org/pub/jma/gs.89039.lzma >> . The output from running cairo-perf-trace on my trace file is >> given below. I have no idea whether the trace info is helpful. >> >> What I could use is some advice about linking statically v. >> dynamically for my binary distributions, and some guidance for how >> to build Cairo from source (with only as-needed features) and link >> it with my application so that I get the same performance as the >> carefully packaged, fully-enabled versions of Cairo. >> >> Thank you!! >> --Jennifer >> >> >> >> -- >> Jennifer M. Adams >> IGES/COLA >> 4041 Powder Mill Road, Suite 302 >> Calverton, MD 20705 >> jm...@co... >> >> >> >> OS X version 10.5.8 >> >> > uname -a >> Darwin Atlantic-2.local 9.8.0 Darwin Kernel Version 9.8.0: Wed Jul >> 15 16:55:01 PDT 2009; root:xnu-1228.15.4~1/RELEASE_I386 i386 >> >> > gcc --version >> i686-apple-darwin9-gcc-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5490) >> >> >> Configuration options used to build cairo from source: >> pkg-config-0.23 >> (I then set the environment vars PKG_CONFIG and PKG_CONFIG_PATH to >> the appropriate places) >> pixman-0.21.2 >> freetype-2.4.3 --without-fsspec --without-fsref --without-ats -- >> without-quickdraw-toolbox --without-quickdraw-carbon >> fontconfig-2.8.0 --enable-libxml2 --with-freetype-config=... >> cairo-1.10.2 --disable-dependency-tracking \ >> --enable-xlib=yes \ >> --enable-xml=yes \ >> --enable-fc=yes \ >> --enable-ft=yes \ >> --enable-xlib-xrender=no \ >> --enable-xcb=no \ >> --enable-qt=no \ >> --enable-quartz=no \ >> --enable-win32=no \ >> --enable-skia=no \ >> --enable-os2=no \ >> --enable-beos=no \ >> --enable-drm=no \ >> --enable-pthread \ >> --enable-gl=no >> >> >> Linking commands used to build gfast and gslow (relevant bits >> highlighed in red): >> >> gcc -g -O2 -lSystemStubs -o gslow grads.o gxsubs.o gxmeta.o >> gxchpl.o gxcntr.o gxstrm.o gxwmap.o gxshad.o gxshad2.o gaexpr.o >> gafunc.o gautil.o gagx.o gscrpt.o gamach.o bufrstn.o gabufr.o >> gabufrtbl.o gxX.o gxdxwd.o galloc.o gaddes.o gaio.o gacfg.o >> gauser.o gasdf.o gatxt.o -L/Users/jma/supplibs/lib -lcairo -L/usr/ >> X11R6/lib -lX11 /Users/jma/supplibs/lib/libreadline.a /Users/jma/ >> supplibs/lib/libncurses.a /Users/jma/supplibs/lib/libgd.a /Users/ >> jma/supplibs/lib/libpng12.a /Users/jma/supplibs/lib/libz.a /Users/ >> jma/supplibs/lib/libjpeg.a /Users/jma/supplibs/lib/libgrib2c.a / >> Users/jma/supplibs/lib/libjasper.a /Users/jma/supplibs/lib/ >> libpng12.a /Users/jma/supplibs/lib/libz.a /Users/jma/supplibs/lib/ >> libmfhdf.a /Users/jma/supplibs/lib/libdf.a /Users/jma/supplibs/lib/ >> libudunits.a /Users/jma/supplibs/lib/libsz.a /Users/jma/supplibs/ >> lib/libjpeg.a /Users/jma/supplibs/lib/libz.a /Users/jma/supplibs/ >> lib/libhdf5.a /Users/jma/supplibs/lib/libsz.a /Users/jma/supplibs/ >> lib/libjpeg.a /Users/jma/supplibs/lib/libz.a /Users/jma/supplibs/ >> lib/libudunits.a /Users/jma/supplibs/lib/libnetcdf.a /Users/jma/ >> supplibs/lib/libhdf5_hl.a /Users/jma/supplibs/lib/libhdf5.a /Users/ >> jma/supplibs/lib/libz.a /Users/jma/supplibs/lib/libsz.a /Users/jma/ >> supplibs/lib/libcurl.a /Users/jma/supplibs/lib/libtiff.a /Users/ >> jma/supplibs/lib/libgeotiff.a /Users/jma/supplibs/lib/libshp.a -lm >> >> gcc -g -O2 -lSystemStubs -o gfast grads.o gxsubs.o gxmeta.o >> gxchpl.o gxcntr.o gxstrm.o gxwmap.o gxshad.o gxshad2.o gaexpr.o >> gafunc.o gautil.o gagx.o gscrpt.o gamach.o bufrstn.o gabufr.o >> gabufrtbl.o gxX.o gxdxwd.o galloc.o gaddes.o gaio.o gacfg.o >> gauser.o gasdf.o gatxt.o -L/opt/local/lib -lcairo -lX11 /Users/jma/ >> supplibs/lib/libreadline.a /Users/jma/supplibs/lib/libncurses.a / >> Users/jma/supplibs/lib/libgd.a /Users/jma/supplibs/lib/libpng12.a / >> Users/jma/supplibs/lib/libz.a /Users/jma/supplibs/lib/libjpeg.a / >> Users/jma/supplibs/lib/libgrib2c.a /Users/jma/supplibs/lib/ >> libjasper.a /Users/jma/supplibs/lib/libpng12.a /Users/jma/supplibs/ >> lib/libz.a /Users/jma/supplibs/lib/libmfhdf.a /Users/jma/supplibs/ >> lib/libdf.a /Users/jma/supplibs/lib/libudunits.a /Users/jma/ >> supplibs/lib/libsz.a /Users/jma/supplibs/lib/libjpeg.a /Users/jma/ >> supplibs/lib/libz.a /Users/jma/supplibs/lib/libhdf5.a /Users/jma/ >> supplibs/lib/libsz.a /Users/jma/supplibs/lib/libjpeg.a /Users/jma/ >> supplibs/lib/libz.a /Users/jma/supplibs/lib/libudunits.a /Users/jma/ >> supplibs/lib/libnetcdf.a /Users/jma/supplibs/lib/libhdf5_hl.a / >> Users/jma/supplibs/lib/libhdf5.a /Users/jma/supplibs/lib/libz.a / >> Users/jma/supplibs/lib/libsz.a /Users/jma/supplibs/lib/libcurl.a / >> Users/jma/supplibs/lib/libtiff.a /Users/jma/supplibs/lib/ >> libgeotiff.a /Users/jma/supplibs/lib/libshp.a -lm >> >> >> > otool -L gslow >> gslow: >> /Users/jma/supplibs/src/cairo/lib/libcairo.2.dylib >> (compatibility version 11003.0.0, current version 11003.2.0) >> /usr/X11/lib/libX11.6.dylib (compatibility version 9.0.0, >> current version 9.0.0) >> /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, >> current version 111.1.5) >> /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, >> current version 1.0.0) >> > otool -L gfast >> gfast: >> /opt/local/lib/libcairo.2.dylib (compatibility version >> 11003.0.0, current version 11003.0.0) >> /opt/local/lib/libX11.6.dylib (compatibility version >> 10.0.0, current version 10.0.0) >> /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, >> current version 111.1.5) >> /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, >> current version 1.0.0) >> >> >> > cairo-perf-trace gg.88743.trace >> [ # ] backend test min(s) median(s) >> stddev. count >> [ # ] image: pixman 0.21.2 >> [ 0] image gg 0.691 0.696 >> 0.30% 6/6 >> [ # ] image16: pixman 0.21.2 >> [ 0] image16 gg 0.692 0.696 >> 0.21% 6/6 >> >> > > ------------------------------------------------------------------------------ > Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! > Finally, a world-class log management solution at an even better > price-free! > Download using promo code Free_Logger_4_Dev2Dev. Offer expires > February 28th, so secure your free ArcSight Logger TODAY! > http://p.sf.net/sfu/arcsight-sfd2d_______________________________________________ > Opengrads-devel mailing list > Ope...@li... > https://lists.sourceforge.net/lists/listinfo/opengrads-devel -- Jennifer M. Adams IGES/COLA 4041 Powder Mill Road, Suite 302 Calverton, MD 20705 jm...@co... |