perf: Optimize login latency and reduce redundant I/O in solidui/pod/auth
Nobody has claimed this yet.
- Dominant language
- Dart
- Stars
- 7
- Forks
- 2
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 3
Description
Description
A performance audit of the login flow has identified several bottlenecks across solidui, solidpod, and solid_auth. The current implementation suffers from redundant network calls, expensive serial I/O, and unnecessary UI blocking.
Identified Issues
- Redundant Network Requests (P1)
Duplicate Profile Fetches: getIssuer() and solidAuthenticate() both fetch the WebID profile independently; the second call should reuse the first.
Redundant Session Refresh: solidAuthenticate() triggers a GET request for the profile card even when a valid session is cached.
No Issuer Caching: getIssuer() re-parses the RDF and fetches the profile on every call.
- Excessive Local I/O & Deserialization (P2)
Repeated State Checks: isUserLoggedIn() is called multiple times, triggering redundant secure storage reads.
JSON/JWT Overhead: TokenResponse.fromJson() and JwtDecoder are executed for every resource access (e.g., 13 parallel requests trigger 13 identical decodes).
-
Serial I/O Bottlenecks (P3)
Synchronous initialization: initPod() handles directory resolution, key file parsing, and file creation (PUT/POST) using serial await loops. These should be executed in parallel where no data dependency exists. -
UI Blocking (P4)
Eager Initialization: SolidLogin blocks the initial frame until all folder/file generation and package info parsing are complete.
Inefficient Rebuilds: _initPackageInfo() triggers multiple setState() calls, causing unnecessary UI reconstructions.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing getIssuer(), solidAuthenticate(), isUserLoggedIn(), TokenResponse.fromJson(), JwtDecoder, initPod(), SolidLogin, and _initPackageInfo(). Map their network, storage, decoding, initialization, and setState work before changing anything. Done means redundant work is reused, independent initialization is parallelized, the initial frame is not blocked, and unnecessary rebuilds are removed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- dart
- Domain
- performance
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100