zeitgeistpm / ui

Zeitgeist general prediction markets application.
https://app.zeitgeist.pm
Apache License 2.0
16 stars 4 forks source link

Lazy load heavy substrate dependencies #524

Open robhyrk opened 1 year ago

robhyrk commented 1 year ago

Performance Analysis

Lazy load heavy substrate dependencies to reduce the initial size of the js we need to load in order for us to start calling Subsquid. This will also require SDK changes and will benefit the initial load time of any page on the app.

Reference to #255

yornaath commented 1 year ago

The sdk v2, currently aliased under sdk-next in the package json loads polkadot dependencies using import(), so this will be in effect when we deprecate the usage of v1. We still might have to load some things dynamically on the client since it does require some polkadot deps, but mostly small utlility function and types that can be imported using import type to exclude them from build.