3 ms·
Building a non-prod Angular project produces a 7 MB js file, so the 2 MB limit definitely needs to be raised. I think it would make sense to have a higher limit
by EatonZ 7y ago
Building a non-prod Angular project produces a 7 MB js file, so the 2 MB limit definitely needs to be raised. I think it would make sense to have a higher limit for certain file types, like js and html.
I am very interested in this feature, but the limit is a bit concerning right now.
- steveklabnik 7y agoThanks! To give some context here, KV is also implemented as a worker, and we encrypt your contents, so we’re also subject to CPU limits. There’s a trade off here and experience reports are super valuable, so thanks :)
- EatonZ 7y agoAs a workaround maybe you could, behind the scenes, split large files into 2 (or more) key-value pairs, and then bill appropriately for the use of 2 key-value pairs instead of just 1.
- steveklabnik 7y agoPossibly, yeah! You won't necessarily get a ton of speed that way...
- judge2020 7y agoThis is how my file stitching logic works, and it's actually pretty fast (some reported 2mbps-30mbps depending if the DC had those keys locally cached), it's just incrementally more expensive for each 2mb increase in file size. https://github.com/judge2020/cloudflare-file-hosting/tree/dd4c5c30aefaee2ca92d652af2a1d600ed72dd5d/lib/fileCore.ts#L67-L89 https://github.com/judge2020/cloudflare-file-hosting/tree/dd... But it might be a little much for this to be a first-party solution.
- steveklabnik 7y agoThanks for the tip. By the way, line 84 introduces some unneeded serialization; you could get some more speed there by fetching the bits in parallel.