Giter Site home page Giter Site logo

fast-grid's Introduction

fast-grid - Try it!

An experiment (and soon NPM package) for how performant a web-table can possibly be

Capabilites

  • Display unlimited rows at O(1), you are only limited by RAM
  • Instant results on filtering millions of rows
  • 60 fps while cruising the scrollbar
  • TODO: publish npm package

Technical details

The most performant DOM-based grid.

  • Resuses parts of DOM-tree to reduce expensive DOM mutations
  • Own event loop to prioritize tasks. Never drops a frame, even when filtering millions of rows
  • Non-passive scrolling. Rows will never be seen rows loading into the UI while scrolling
  • Custom virtualization and scrolling. Not limited by browsers 15 million pixel div height limit
  • Custom built scrolling for phones, and runs at 60fps even on older phones

One million rows benchmark (Air M2)

Benchmark Score
Scroll 40 rows every frame 60fps
Filtering 110ms
Time to initialize grid and show rows 1.5ms
Scroll 40 rows every frame + filter same time every 300ms 45fps

Need an even more performant table?

This is the most performant DOM-based table. The fastest table ever built (by far), directly using the GPU and streaming rows efficiently from a custom DB, is dataland.io. It can render billions of rows at ~5x FPS versus a DOM-based table.

Disclaimers

In the example web-app, sorting is still blocking main thread, meaning it drops frames. Adding to the custom event loop soon. Also you cannot sort and filter at the same time, a TODO but figuring out how I can do this off-thread and potentially in wasm with a zero copy datatype

TODO before npm launch

  • break out filtering into its own package
  • config for sort/filter for all columns
  • detach scrollbar from logic, & isolate logic in general
  • modify cells
  • resize columns
  • custom cells
  • make sure rows are ordered correctly for text selection
  • publish npm package

TODO features/performance

  • expand synthetic event-loop to include scrolling & rendering cell contents
  • make scrolling one viewport every frame while filtering a million rows at the same time run 40fps (macbook air)
  • support filter + sort at same time
  • chunk up sorting so it's not blocking main thread

fast-grid's People

Contributors

gabrielpetersson avatar

Stargazers

Martin Juul avatar Mohsin Shaikh avatar Daniyaal Beg avatar B2Storefront avatar  avatar Matthieu Vion avatar Throughout heaven and earth,  avatar Ilya Medvedev avatar Sterne Lee avatar George Raptis avatar Rhythm Ruparelia avatar vaibhav avatar gaoryrt avatar Tom Byrer avatar Michael W. Delaney avatar Erik Shafer avatar Nicholas avatar Lionel Tzatzkin avatar Naiyer Asif avatar Andrii Oriekhov avatar Zach Leatherman avatar anonr avatar Eyo O. Eyo avatar Nelson avatar Pure Engineering avatar Lilian Prus avatar Ismail avatar Kelvin Yong avatar telmen avatar Felix Kaspar avatar  avatar Manish Jha avatar Jonatas Santos avatar Antoine avatar Hugo Piquemal avatar Sait Ergün avatar Onur avatar Bridger Tower avatar EL MAHDI Bouzkoura avatar Evgeny avatar Jack Hsu avatar Evgeniy Boreyko avatar Muhaimin CS avatar  avatar zhouchengfeng avatar Dody avatar Wyatt Stanke avatar Jake Chvatal avatar Geoff Holden avatar Daniel Hartmann avatar Abiel Zulio M avatar Stefan Kopco avatar Okiki Ojo avatar Ismail Ghallou  avatar SHYAKA Davis avatar mat avatar André Neves avatar Julio Merisio avatar Seb Insua avatar Griko Nibras avatar Timur avatar Miguel Ferreira avatar Tobias avatar João Palmeiro avatar Zeh Fernandes avatar  avatar Rémi Bonnet avatar paco avatar  avatar Jacqueline Gutman avatar  avatar jay avatar Jatin Jindal avatar Kernel Soe avatar Nazif BERAT avatar Rodrigo Weilg avatar Iryna Ziakhor avatar Deepankar avatar Anoop avatar  avatar Akshat Giri  avatar Daniel Schmidt avatar Dmitry Ledentsov avatar İsmail Codar avatar Stefano Azzolini avatar Leon Sorokin avatar Azlen Elza avatar Robin Stoltz avatar Judah avatar Ahmed_Hany avatar Mike avatar Alex Bennett avatar Greg Hochmuth avatar a13ph avatar Mustafa avatar Rahul Tarak avatar Owais avatar Khoa avatar  avatar Aaronphy avatar

Watchers

Leon Sorokin avatar Dezso Papp avatar  avatar  avatar jay avatar SHYAKA Davis avatar

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.