why scons is not slow
play

Why SCons is not slow ./agg/src/agg_curves.o - PowerPoint PPT Presentation

./plugins/input/raster/raster_info.os ./plugins/input/raster/raster_datasource.os ./src/font_engine_freetype.os ./plugins/input/raster/raster .input ./src/point_symbolizer .os ./src/scale_denominator .os ./src/envelope.os


  1. ./plugins/input/raster/raster_info.os ./plugins/input/raster/raster_datasource.os ./src/font_engine_freetype.os ./plugins/input/raster/raster .input ./src/point_symbolizer .os ./src/scale_denominator .os ./src/envelope.os ./src/image_util.os ./plugins/input/raster ./src/graphics.os ./src/text_symbolizer .os ./plugins ./src/png_reader .os ./src/polygon_pattern_symbolizer .os ./src/map.os ./src/wkb.os ./src/line_pattern_symbolizer .os ./src/symbolizer .os ./src/plugin.os ./plugins/input/raster/raster_featureset.os ./src/layer .os ./src/proj_transform.os ./src/tifg_reader .os ./src/load_map.os ./src ./src/datasource_cache.os ./src/save_map.os ./plugins/input ./src/libmapnik.so ./plugins/input/shape/shape.os ./src/color .os ./src/memory_datasource.os ./src/params.os ./src/placement_fjnder .os ./src/font_set.os ./src/libxml2_loader .os ./plugins/input/shape/shape_io.os ./src/arrow .os ./src/distance.os ./src/agg_renderer .os ./plugins/input/shape ./plugins/input/shape/shape_index_featureset.os ./src/stroke.os ./src/memory .os ./src/projection.os ./src/image_reader .os ./src/unicode.os ./plugins/input/shape/shape.input ./src/shield_symbolizer .os ./plugins/input/shape/dbffjle.os ./src/fjlter_factory .os ./plugins/input/shape/shapefjle.os ./plugins/input/shape/shape_featureset.os ./agg/src/agg_trans_double_path.o ./agg/src/agg_sqrt_tables.o ./bindings/python/mapnik_raster_symbolizer .os ./bindings/python/mapnik_text_symbolizer .os ./agg/src/agg_vcgen_dash.o ./agg/src/agg_bezier_arc.o ./agg/src/agg_vpgen_clip_polygon.o ./agg/src/agg_vcgen_contour .o ./agg/src/agg_gsv_text.o ./bindings/python/mapnik_color .os ./agg/src/agg_arrowhead.o ./bindings/python/mapnik_query .os ./agg/src/agg_bspline.o ./bindings/python/mapnik_stroke.os ./agg/libagg.a ./agg/src/agg_vpgen_clip_polyline.o ./agg/src/agg_trans_single_path.o ./agg/src/agg_vcgen_stroke.o ./agg/src/agg_trans_warp_magnifjer .o ./bindings/python/mapnik_featureset.os ./bindings/python/mapnik_style.os ./agg/src/agg_embedded_ras ter_fonts.o ./bindings/python/mapnik_parameters.os ./bindings/python/mapnik_shield_symbolizer .os ./agg/src ./agg/src/agg_arc.o Why SCons is not slow ./agg/src/agg_curves.o ./bindings/python/mapnik_line_pattern_symbolizer .os ./agg/src/agg_vcgen_bspline.o ./agg/src/agg_rounded_rect.o ./bindings/python/mapnik_symbolizer .os ./agg/src/agg_image_fjlters.o ./bindings/python/mapnik_python.os ./bindings/python/mapnik_fjlter .os ./agg/src/agg_line_aa_basics.o ./bindings/python/mapnik_map.os ./bindings ./bindings/python/mapnik_layer .os Dirk Bächle ./agg/src/agg_line_profjle_aa.o ./agg/src/agg_vpgen_segmentator .o ./agg ./bindings/python ./agg/src/agg_vcgen_markers_term.o ./bindings/python/mapnik_image_view .os ./bindings/python/python_cairo.os ./bindings/python/mapnik ./agg/src/agg_vcgen_smooth_poly1.o ./agg/src/agg_trans_affjne.o ./bindings/python/mapnik/ogcserver ./bindings/python/mapnik_polygon_symbolizer .os ./bindings/python/mapnik_geometry .os ./bindings/python/mapnik_point_symbolizer .os ./bindings/python/_mapnik.so ./bindings/python/mapnik_envelope.os ./bindings/python/mapnik_rule.os ./agg/include PyCon.FR 2014 ./bindings/python/mapnik_feature.os ./bindings/python/mapnik_image.os ./bindings/python/mapnik_polygon_pattern_symbolizer .os ./bindings/python/mapnik_coord.os ./bindings/python/mapnik_view_transform.os ./bindings/python/mapnik_datasource_cache.os ./bindings/python/mapnik_datasource.os ./bindings/python/mapnik_line_symbolizer .os ./bindings/python/mapnik_projection.os ./bindings/python/mapnik_proj_transform.os ./bindings/python/mapnik_font_engine.os

  2. 1. Intro to SCons 2. Problem 3. Analysis 4. Results - Why SCons is not slow, PyCon.FR 2014

  3. #include "foo.h" #define FOO "foo" int main(void) { return 0; } env = Environment() env.Program('main.cpp') > ls foo.h main.cpp SConstruct > scons g++ -o main.o -c main.cpp g++ -o main main.o - Why SCons is not slow, PyCon.FR 2014

  4. Posix > scons g++ -o main.o -c main.cpp g++ -o main main.o Windows C:\> scons cl /Fomain.obj /c main.cpp /TP /nologo link /TP /nologo /OUT:main.exe main.obj - Why SCons is not slow, PyCon.FR 2014

  5. > scons scons: `.' is up to date. > (edit foo.h: Kommentar) > scons g++ -o main.o -c main.cpp > > (edit main.cpp: Neue Funktion) > scons g++ -o main.o -c main.cpp g++ -o main main.o - Why SCons is not slow, PyCon.FR 2014

  6. Implicit dependencies > scons --tree=all main scons: `main' is up to date. +-main +-main.o | +-main.cpp | +-foo.h | +-/usr/bin/g++ +-/usr/bin/g++ - Why SCons is not slow, PyCon.FR 2014

  7. Picking a different compiler env = Environment() env['CC'] = '/opt/bin/mygcc' env.Program('main','main.cpp') # or env.Replace(CC='/opt/bin/mygcc') env.Program('main','main.cpp') # or even env.Program('main','main.cpp', CC='/opt/bin/mygcc') - Why SCons is not slow, PyCon.FR 2014

  8. A simple LaTeX example env = Environment() env.PDF(['mybook.tex']+ Glob('images/*.eps')) > scons epstopdf images/circle.eps --outfile=images/circle.pdf cd . && pdflatex mybook.tex cd . && bibtex mybook cd . && pdflatex mybook.tex cd . && pdflatex mybook.tex - Why SCons is not slow, PyCon.FR 2014

  9. Implicit dependencies > scons --tree=derived mybook.pdf scons: `mybook.pdf' is up to date. +-mybook.pdf +-mybook.tex +-chap1.tex +-chap2.tex +-images/circle.pdf | +-images/circle.eps | +-/usr/bin/epstopdf +-images/rectangle.png +-sources.bib - Why SCons is not slow, PyCon.FR 2014

  10. Nsis, Corba, C/C++, Asm, Chapel, C#, PyUic, Rpc, Lyx, Fortran, Java, D, CPython, Pyrex, Gch, Doxygen, Eiffel, TeX/LaTeX, CxxTest, Erlang, Gnuplot, DocBook, Cheetah, Go, GObject, gettext, FltkFluid, Haskell, M4, lex/yacc, InnoSetup, MFObject, Qt3, SWIG Cuda, WiX, OCaml, NDDS4 protobuf, Install, Zip, Tar, Qt4+Qt5, reST, Rpm, Msi RightNow, Sphinx, Vala, X10 - Why SCons is not slow, PyCon.FR 2014

  11. Down the rabbit hole... - Why SCons is not slow, PyCon.FR 2014

  12. Actions as parameterized templates Compile action : '$CC -o $TARGET -c $CFLAGS $CCFLAGS $SOURCES' - Why SCons is not slow, PyCon.FR 2014

  13. First benchmark graph - Why SCons is not slow, PyCon.FR 2014

  14. Benchmark structure . ├── SConstruct ├── 500 C files (→ static lib + main, 20 each) ├── Lup_001 │ └── 500 headers ├── D1_001 │ ├── 500 C files (→ static lib + main, 20 each) │ └── Lup_d1_001 │ └── 500 headers ├── D1_002 │ └── … … - Why SCons is not slow, PyCon.FR 2014

  15. Benchmark sources //////// Header: //////// //////// Header: //////// #ifndef f00249_sconsbld class class_0 { #define f00249_sconsbld "sconsbld" public: #include "stdio.h" class_0(); ~class_0(); #endif }; //////// Source: //////// #include <f00249_sconsbld.h> //////// Source: //////// #include <omega.h> #include "class_0.h" extern int printr_f00250_sconsbld (char * fname); ...several more includes printr_f00249_sconsbld (char * fname) { printr_f00250_sconsbld (fname); class_0::class_0() {} return (0); class_0::~class_0() {} } - Why SCons is not slow, PyCon.FR 2014

  16. (Source: http://memekid.com/meme-faces-challenge-accepted.htm) - Why SCons is not slow, PyCon.FR 2014

  17. Basic method Profile! Measure! Document the results! Profile! Measure! Document the results! Profile! Measure! Document the results! Profile! Measure! Document the results! Profile! Measure! Document the results! Profile! Measure! Document the results! Profile! Measure! Document the results! Profile! Measure! Document the results! Profile! Measure! Document the results! Profile! Measure! Document the results! Profile! Measure! Document the results! …. - Why SCons is not slow, PyCon.FR 2014

  18. Our chief weapons... /usr/bin/time cProfile.py gprof2dot.py (Source: The Spanish Inquisition , jumperbean2, https://www.youtube.com/watch?v=Tym0MObFpTI ) - Why SCons is not slow, PyCon.FR 2014

  19. Inspecting the Taskmaster - Why SCons is not slow, PyCon.FR 2014

  20. CPython vs PyPy - Why SCons is not slow, PyCon.FR 2014

Recommend


More recommend