flutter_widget_from_html icon indicating copy to clipboard operation
flutter_widget_from_html copied to clipboard

Meta: test on dartpad

Open daohoangson opened this issue 5 years ago • 5 comments

Link: https://dartpad.dev/embed-flutter.html

Need to wait for https://github.com/dart-lang/dart-pad/issues/901

daohoangson avatar Oct 13 '19 14:10 daohoangson

Need whitelisting https://medium.com/dartlang/announcing-package-support-for-dartpad-66a4b415970b

daohoangson avatar Nov 15 '21 23:11 daohoangson

https://try.fwfh.dev/ is functional.

  • dart-services is running in a Cloud Run container with 4GB RAM, 2 CPU
  • dart-pad is running with 512MB, 1 CPU
  • There is only 1 NNBD backend
  • Both services are behind one single global LB
Screen Shot 2021-11-17 at 13 56 41

It's quite slow:

  • Obvious issue with cold start, which is unavoidable to save cost
  • Importing flutter_widget_from_html produces a 5MB compiled JS bundle.
  • Importing core is better but still ~2MB

daohoangson avatar Nov 17 '21 07:11 daohoangson

https://try.fwfh.dev/ tech stack has been updated

  • Frontend is now served via Firebase hosting, way faster than the previous Cloud Run deployment
  • Backend is configured with --cpu-boost to reduce cold start; concurrency=2, max=5 for better performance
  • The old GCP load balancer is being retired

daohoangson avatar Sep 29 '23 03:09 daohoangson

Since flutter-widget-from-html/try#5, it has been updated again. Backend is now being deployed in Railway to avoid the slow GCP cold start: only 15s now vs. the previous 45s.

daohoangson avatar Oct 02 '23 03:10 daohoangson

Thanks to efforts in flutter-widget-from-html/try@6674408, cold start is usually less than 6s now.

daohoangson avatar May 20 '24 13:05 daohoangson