Giter Site home page Giter Site logo

Comments (3)

nyurik avatar nyurik commented on June 20, 2024

at the moment, every request re-generates the PNG. Caching is at the early stage of development. In the mean time, I highly recommend using nginx or varnish caching in front of Martin for now.

from martin.

lxup avatar lxup commented on June 20, 2024

Alright, I understand better now. But why not generate the PNG image when launching the container (I ask as a student, please excuse me if I'm saying something silly haha), since to update the sprites you have to restart the container anyway? And is it possible to specify a size for each SVG (in the config file, for example)?

PS: @nyurik Is it possible to contact you to ask a few questions for a study project (its very hard to find answer for gis stuff)?

from martin.

nyurik avatar nyurik commented on June 20, 2024

@lxup I agree it should be cached in some way. Options:

  • cache on startup, but that won't work well with dynamically combining sprites. Maybe cache just the individual sprites, but generate+cache composite ones on the fly.
  • cache on first request - probably better approach, but the first request will always take a bit longer

Regardless, caching implies that any changes to the files will not be picked up. This conflicts with the long standing #288 request - so we would need a way to monitor directory for changes, and update cache when that happens.

Sure, feel free to email me (its on my github main page)

from martin.

Related Issues (20)

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.