Closed danisharora099 closed 5 months ago
Path | Size | Loading time (3g) | Running time (snapdragon) | Total time |
---|---|---|---|---|
Waku node | 185.23 KB (-0.01% 🔽) | 3.8 s (-0.01% 🔽) | 1.1 s (+37.38% 🔺) | 4.8 s |
Waku Simple Light Node | 185.28 KB (+0.07% 🔺) | 3.8 s (+0.07% 🔺) | 1.1 s (-26.32% 🔽) | 4.8 s |
ECIES encryption | 22.89 KB (0%) | 458 ms (0%) | 480 ms (+91.22% 🔺) | 938 ms |
Symmetric encryption | 22.34 KB (0%) | 447 ms (0%) | 173 ms (-59.75% 🔽) | 619 ms |
DNS discovery | 69.95 KB (0%) | 1.4 s (0%) | 716 ms (-0.35% 🔽) | 2.2 s |
Privacy preserving protocols | 39.96 KB (+0.29% 🔺) | 800 ms (+0.29% 🔺) | 612 ms (+62.16% 🔺) | 1.5 s |
Light protocols | 0 B (-100% 🔽) | 0 ms (-100% 🔽) | 0 ms (-100% 🔽) | 0 ms |
History retrieval protocols | 19.34 KB (-0.04% 🔽) | 387 ms (-0.04% 🔽) | 353 ms (+46.42% 🔺) | 740 ms |
Deterministic Message Hashing | 4.96 KB (0%) | 100 ms (0%) | 31 ms (-48.69% 🔽) | 130 ms |
Waku Filter | 20.11 KB (+100% 🔺) | 403 ms (+100% 🔺) | 298 ms (+100% 🔺) | 700 ms |
Waku LightPush | 115.49 KB (+100% 🔺) | 2.4 s (+100% 🔺) | 937 ms (+100% 🔺) | 3.3 s |
Problem
https://github.com/waku-org/js-waku/issues/1886
Solution
Moves away the abstraction of using multiple peers for lightpush by:
LightPushSDK
(and renaming protocol implementation toLightPushCore
)LightPushCore
remains accessible from withinLightPushSDK
(it is an abstraction)BaseProtocolSDK
that houses information such as number of peers for the protocolSDK
-type protocol classes (asBaseProtocol
is common between all protocol implementation classes)Notes
SendResult
types by renamingrecipients
tosuccesses
, and introducingfailures
of the typeerror: SendError, peerId
LightPushSDK
usingPromise.allSettled()