Skip to content

Instantly share code, notes, and snippets.

@springmeyer
Last active September 29, 2016 03:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save springmeyer/66ac0c750e0df4f9748198c5dae456a8 to your computer and use it in GitHub Desktop.
Save springmeyer/66ac0c750e0df4f9748198c5dae456a8 to your computer and use it in GitHub Desktop.

Testcase

/usr/bin/time -f 'mem used: %M / time used: %E' ./build/osrm-extract -p profiles/car.lua central-america-latest.osm.pbf 

osrm-backend patched to exit after parsing:

diff --git a/src/extractor/extractor.cpp b/src/extractor/extractor.cpp
index 39af536..d3223ab 100644
--- a/src/extractor/extractor.cpp
+++ b/src/extractor/extractor.cpp
@@ -214,6 +214,7 @@ int Extractor::run(ScriptingEnvironment &scripting_environment)
         util::SimpleLogger().Write() << "Raw input contains " << number_of_nodes << " nodes, "
                                      << number_of_ways << " ways, and " << number_of_relations
                                      << " relations";
+        return 0;
 
         // take control over the turn lane map
         turn_lane_map = extractor_callbacks->moveOutLaneDescriptionMap();

boostrap.sh modified to allow testing difference lua versions:

    rm -rf ./mason_packages/.link/
    if [[ ${LUA53:-false} != false ]];then
      dep_source lua 5.3.0
      dep_source luabind e414c57bcb687bb3091b7c55bbff6947f052e46b
    elif [[ ${LUA533:-false} != false ]];then
      dep_source lua 5.3.3
      dep_source luabind_lua533_boost61 e414c57bcb687bb3091b7c55bbff6947f052e46b
    elif [[ ${LUA52:-false} != false ]];then
      dep_source lua 5.2.4
      dep_source luabind_lua524 e414c57bcb687bb3091b7c55bbff6947f052e46b
    elif [[ ${LUA53SYS:-false} != false ]];then
      dep_source luabind_lua530sys e414c57bcb687bb3091b7c55bbff6947f052e46b
    else
      echo "must provide LUA var"
      exit 1
    fi

lua 5.2.4 / mason

  • rm -rf build; time LUA52=1 ./scripts/ci-build.sh $(pwd)/here
  • osrm@5.4:
  • 21 seconds
  • 540384 kb
  • osrm@5.3:
  • 21 seconds
  • 526992 kb
  • osrm@5.3 with libjemalloc latest
  • 24 s
  • 3057240 kb
  • osrm@5.3 without mapbox/mason#254 fixed (for other runs it was fixed locally)
  • 24 s
  • 534184 kb
  • osrm@5.3 with -O3 -DNDEBUG -Wall -DLUA_COMPAT_ALL instead of the default of -O2 -Wall -DLUA_COMPAT_ALL
  • 21 s
  • 520312 kb
  • osrm@5.4 (osx):
  • 78 seconds
  • 462409 kb
  • osrm@5.4 (osx + gc mod1)
  • 72 s
  • 8079175 kb

LUA53: lua 5.3.0 / mason

  • rm -rf build; time LUA53=1 ./scripts/ci-build.sh $(pwd)/here
  • osrm@5.4:
  • 33 seconds
  • 1577464 kb
  • osrm@5.3:
  • 33 seconds
  • 1332520 kb

LUA533: lua 5.3.3 / mason

  • rm -rf build; time LUA533=1 ./scripts/ci-build.sh $(pwd)/here
  • osrm@5.4:
  • 66 seconds
  • 7246964 kb
  • osrm@5.3:
  • 62 sec (1:16.29 wall clock)
  • 6910204 kb
  • osrm@5.3 with LUA_EXTRASPACE=0
  • 68 s
  • 6874364 kb
  • osrm@5.3 with libjemalloc latest
  • 53 s
  • 16758508 kb
  • osrm@5.4 (osx):
  • 83 seconds
  • 6824566 kb
  • osrm@5.4 (osx + gc mod1)
  • 67 s
  • 7742881
  • sudo apt-get install lua5.3 lua5.3-dev
  • rm -rf build; time LUA53SYS=1 ./scripts/ci-build.sh $(pwd)/here
  • osrm@5.4:
  • 34 seconds
  • 1586168 kb
  • osrm@5.3:
  • 32 seconds
  • 1359872 kb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment