anusii / anusii/solidui

perf: Optimize login latency and reduce redundant I/O in solidui/pod/auth

Open
#224 0 comments 0 reactions 0 assignees View on GitHub

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

  1. 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.

  1. 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).

  1. 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.

  2. 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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.