Giter Club home page Giter Club logo

mapnik's People

Contributors

artemp avatar avlee avatar beaugunderson avatar cezarytarnowski-tomtom avatar cpsandbox avatar eightysteele avatar herm avatar jburgess777 avatar jfdoyon avatar jmdh avatar kkaefer avatar kunitoki avatar lexman avatar lightmare avatar manelclos avatar mrudowski1 avatar nehhen avatar nickw1 avatar noirbizarre avatar petrdlouhy avatar ramunasd avatar rcoup avatar rjw57 avatar rundel avatar simonsonc avatar ssinger avatar thjc avatar tmcw avatar tomhughes avatar zerebubuth avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mapnik's Issues

Parallel queries

The branch https://github.com/mappy/mapnik/tree/parallel_queries contains our work for adding parallel queries to Posgtis, which can serve as a basis for general parallelisation of datasources.

Scheduling the rendering for parallelisation

You might notice that we had to make important changes on the rendering loop :
we've split fonction apply_to_layer in two : prepare_datasource_query and render_styles, so that we could split the main rendering loop in apply in two :
first loop calls prepare_datasource_query which collects iterators on features, and gives it back to render_styles throug a rendering_material structure.

Thus, we'll be able to launch asynchronous fetching of the features on the first loop. For the moment, it has to be done inside the plugin itself, but this should be the place to launch a thread. For the moment, we've only developped a change in Postgis plugin that takes avdantage of that by sending an asynchronous query when calling method features(), and waiting for database response when iterating on the features begin.

To do this, we took the liberty to replace the memory_datasource by a featureset_buffer wich is more suitable for our use.

Launching asynchronous queries on Postgres

We use native postgres function PQsendQuery when the rendering engine requires a features iterator through plugin->features() method, and when the rendering engine tries to read the first feature, we use PQgetResult which waits until some features are available.

By the way, we had to introduce the notion of "rendering context" on a plugin to schedule the several database queries for the same map, without concurrency issues. This induces changes on the plugin interface that are transparent for the current implementations. This option was far more pragmatic than creating a pool of layers to render.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.