flutter_eval icon indicating copy to clipboard operation
flutter_eval copied to clipboard

Add `EvcLoader`

Open wrbl606 opened this issue 1 year ago • 2 comments

Add EvcLoader and its implementations for asset, file, http fetching to:

  • reuse code loading logic between widgets
  • support custom loaders for e.g. fetching files over gRPC, auth-only HTTP endpoints, encrypted files, ...

Docs to be added/updated, just let me know if there's something I've missed in the current implementation first 😇

wrbl606 avatar Jun 09 '24 19:06 wrbl606

@ethanblake4 any objections to the proposal? 😇

wrbl606 avatar Jun 12 '24 13:06 wrbl606

Thanks, that's a great idea. The only potential issue is that it is replacing all synchronous file I/O with async file I/O which is slower, and in the case of HotSwapLoader which actually blocks your whole app from loading until the runtime has been created, this could cause a slower start-up time. The amount of time might be irrelevant, but I'd appreciate if you could test that (a basic test program that just tests sync and async loading speed of a standard EVC file is fine) just in case.

ethanblake4 avatar Jun 18 '24 18:06 ethanblake4