GithubHelp home page GithubHelp logo

joonmo-you / modulepreload-demo Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rich-harris/modulepreload-demo

1.0 0.0 0.0 77 KB

Home Page: https://modulepreload-demo.vercel.app

JavaScript 57.67% HTML 42.33%

modulepreload-demo's Introduction

modulepreload-demo

If you import a module a.js that imports another module b.js, a can't evaluate until both modules have been fetched (and so on if b.js imports c.js). Assume it takes 100ms to load one module: the time it takes to start your app is at minimum 100ms multiplied by the height of your dependency graph.

In Chromium, if you know the module graph ahead of time then this problem is solved with modulepreload, which allows the modules to be fetched simultaneously (without eagerly evaluating them, which will often cause bugs in real apps.) It is not supported in Safari or Firefox. This demo adds artifical latency to demonstrate the problem โ€” in Chrome the 'loaded' message will appear after 1 second, but in Firefox and Safari it will take 3.

modulepreload-demo's People

Contributors

rich-harris avatar

Stargazers

 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.