Giter Site home page Giter Site logo

Comments (4)

quintonparker avatar quintonparker commented on May 31, 2024

We run a large-ish ecommerce store and we use varnish devicedetect for millions of requests per month. We're able to serve the full request (include a devicedetect call) from varnish in as little as 1e-4 ie. less than a millisecond

i guess this is in part due to pcre jit which should be enabled by default in most varnish installs

from varnish-devicedetect.

The-Don-Himself avatar The-Don-Himself commented on May 31, 2024

@quintonparker
Wow, thank you for the prompt response!

So in your option, using this script to detect a device will not take 125ms, in fact, in your experience it should take less than 1ms!? This is awesome, I must try it and although I will close this issue, I will update it with any benchmarks I get from my app with mobile detect in place.

Cheers!

from varnish-devicedetect.

quintonparker avatar quintonparker commented on May 31, 2024

You're welcome. You can even apply an optimisation on top of that by instructing browsers/agents to save the result as a cookie and so you can bypass the device detection and use the value from the cookie instead

from varnish-devicedetect.

The-Don-Himself avatar The-Don-Himself commented on May 31, 2024

@quintonparker
By the way, I just realized that to benchmark it, I do not have to change my application code. I just installed it on varnish and checked if its working by manipulating the browser agent in Chrome console. After confirming that it was working, I compared the load times before and after installation. Your 1ms (at worst) seems spot on!

To integrate this, I must however, change alot in my app but make no mistake, it already seems totally worth it! Thanks.

from varnish-devicedetect.

Related Issues (17)

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.