Arlen Beiler

Results 235 comments of Arlen Beiler

Checking all plugins ```js const times = false; const buf = fflate.strToU8(JSON.stringify({tiddlers: pluginInfo.tiddlers})); if(times) console.time(pluginInfo.title + " compress") const compressed = fflate.compressSync(buf, { level: 4, mem:5 }); if(times) console.timeEnd(pluginInfo.title +...

Ok, I'd say this is ready for discussion. - I added the plugin info mechanism (it's very simple and might need a few tweaks). - I added the file type...

> ### 📊 Build Size Comparison: `empty.html` > Base (master) 2528.4 KB > PR 727.8 KB > **Diff:** **⬇️ Decrease: `1800.6 KB`** Love it.

> Are we sure we want to be making up mime types? `application/vnd.json.gz`? It took me a while to find a mime type that was both valid and sensible. And...

> Otherwise we are packaging gzip _forever_. And for _everyone_. # YES Ok, joking aside, yeah, you're absolutely correct. At least until TW 6 (or X if that's next). But...

> In terms of functionality, I think you'll need to fix up a couple more things before this will work with switchable plugins (ie themes and languages): > > *...

@flibbles, I think I understand where you're coming from, I haven't yet taken a look at it from the perspective of MWS, which has exactly the scenario you are describing,...

> IMO ES2016 and ES2017 do not contain much, that would really improve our code. Yeah, there's not a lot there. The ones that stand out to me are: -...

Most of the server code is in core or boot. The code is usually still parsed by the browser, which means that parsing errors would happen.

Shouldn't this be writing the response stream directly to the file system rather than receiving it as a buffer first? Something like this? (Code untested, please test first) ```js exports.bodyFormat...