Giter Site home page Giter Site logo

Use svg for rendering about holder HOT 4 CLOSED

imsky avatar imsky commented on September 26, 2024
Use svg for rendering

from holder.

Comments (4)

imsky avatar imsky commented on September 26, 2024

Canvas still has wider support than SVG, especially in older Firefox versions. However, I did add a SVG renderer and it looks like there is a significant speed up:

BrowserImagesCanvasSVGSVG speedup
Chrome 305013 ops/sec152 ops/sec12x
Chrome 301006.5 ops/sec80.8 ops/sec12x
Chrome 302003.3 ops/sec43.3 ops/sec13x
Firefox 24502.4 ops/sec50 ops/sec21x
Firefox 241001.2 ops/sec26.8 ops/sec22x
Firefox 242000.6 ops/sec13.5 ops/sec23x

I'll continue working on the SVG renderer and it may be included in the next version.

from holder.

ooxi avatar ooxi commented on September 26, 2024

I think going forward and releasing an SVG renderer based holder version would be great. Maybe doing it like jQuery and providing one file with canvas fallback and another without would be the way to go.

from holder.

sarim avatar sarim commented on September 26, 2024

Yes, Its true svg support is not complete is browsers but most of them supports very basic features of svg. Creating a rectangle and a textbox is supported AFAIK.

Your test result is just "wow". 12x speedup !!!

Maybe you can push your svg experiment in another branch ? I'm temporarily using this code in one of my project now.

from holder.

imsky avatar imsky commented on September 26, 2024

I'll push the SVG renderer as soon as the canvas fallback is implemented for older browsers.

from holder.

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.