6 ms·
Hello World example: 15 requests. 21.65 MB / 7.66 MB transferred. Finish: 8.19 s. DOMContentLoaded: 707 ms. load: 2.95 s. no, stop. I'm super confused about t
by asojfdowgh 4y ago
Hello World example:
15 requests.
21.65 MB / 7.66 MB transferred.
Finish: 8.19 s.
DOMContentLoaded: 707 ms.
load: 2.95 s.
no, stop. I'm super confused about the obsession of clonking specifically the reference implementation when other implementations exist, like micropython for example. Sure, less compatible, but you are already not getting native modules so shrug?
- ecmascript 4y agoThe funny part is that I can see many of these people that want to use python in the browser to complain about modern SPAs being too heavy when it's literally nothing in comparison.
- toyg 4y agoPart of the complaint is really from developers who hate dealing with the vagaries of JS build tools. Python on WASM would wipe all of that.
- nerpderp82 4y agoI too laugh at the kinds of things I imagine straw men saying. Darndest things come out of their mouths!
- joelthelion 4y agoIf Cpython is transferred as a separate artifact, probably for a CDN, it will be cached super efficiently. I'm not sure whether it's that much of a problem.
- __alexs 4y agoBrowsers do not share cache hits to CDNs anymore. The cache is sharded (not shared) across origins.
- rewq4321 4y agoAs of quite recently that may be changing in Chromium (early experiment): https://groups.google.com/a/chromium.org/g/blink-dev/c/9xWJK3IgJb4 https://groups.google.com/a/chromium.org/g/blink-dev/c/9xWJK... IIUC, the TLDR is that they're experimenting with loading a bunch of popular scripts (e.g. top `N` scripts from CDNs) on all browsers, so the response is immediate, but they can't use the timing for fingerprinting because it's immediate for everyone.
- tlarkworthy 4y agoOf course it's a problem, that cache is not shared across domains, so it will be the initial experience of your users. Perhaps they can do some kind of lazy loading magic to hide it eventually
- asojfdowgh 4y agouncached, 8 seconds, cached, 6.5 seconds Loading the entire wasm, touching all the things that need to be touched, etc, takes up the majority of the time
- toyg 4y agoThe good thing though is: because it's a WASM problem, not a Python problem, it will likely get better with time, and the benefits will automatically percolate to Python too.
- mathgenius 4y agoYeah, it's cpython because you are getting at least some native modules, numpy, pandas, scikit-learn, etc. It's a matter of compiling the c modules to WASM...
- singularity2001 4y agoreference implementation can probably be de-cluttered and modularized a lot. Unfortunately https://www.npmjs.com/package/micropython https://www.npmjs.com/package/micropython is three years unmaintained. Runtime offset of Hello World matters a lot less if you do real python stuff: physics, neural networks etc
- asojfdowgh 4y agoThat's a random unofficial build of micropython, MP is still in active development (the specific build target got touched 3 days ago)