LearnNewsExamplesServices
Frontmatter
id9309
titlePerformance: Remove avatarUrl convert overhead in DevIndex Contributor Model
stateClosed
labels
enhancementaiperformance
assigneestobiu
createdAtFeb 26, 2026, 3:33 PM
updatedAtFeb 26, 2026, 3:38 PM
githubUrlhttps://github.com/neomjs/neo/issues/9309
authortobiu
commentsCount1
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAtFeb 26, 2026, 3:38 PM

Performance: Remove avatarUrl convert overhead in DevIndex Contributor Model

Closed v12.0.0/archive-v12-0-0-chunk-4 enhancementaiperformance
tobiu
tobiu commented on Feb 26, 2026, 3:33 PM

The DevIndex backend spider engine fetches raw avatar_url from the GitHub REST API. Previously, the DevIndex.model.Contributor was performing an expensive convert operation on instantiation to map this into a full URL format under the avatarUrl field.

To optimize performance for 50k+ records, this ticket removes the convert overhead. The model now maps the raw ID string into the avatarUrl field directly.

Consequently, the UI components (GitHubUser, GitHubOrgs, and ProfileContainer) have been updated to smartly detect if avatarUrl is a full HTTP string or just an ID, dynamically constructing the https://avatars.githubusercontent.com/... link at render time. This maintains compatibility for both the highly optimized DevIndex app and general framework usage.

Changes:

  • apps/devindex/model/Contributor.mjs: Removed convert overhead for avatarUrl and organizations.
  • apps/devindex/view/home/ProfileContainer.mjs: Updated getAvatarUrl() to handle raw IDs.
  • src/component/GitHubUser.mjs: Updated URL construction logic.
  • src/component/GitHubOrgs.mjs: Updated URL construction logic.
  • src/grid/column/GitHubUser.mjs: Mapped avatarUrl from record.avatarUrl.
tobiu
tobiu Feb 26, 2026, 3:37 PM

Input from Gemini 3.1 Pro:

✦ Successfully completed and pushed to the dev branch in commit 29bb47d1e.

Summary of Completion:

  1. Reverted changes to apps/devindex/services/Updater.mjs to protect the backend spider logic.
  2. Removed convert overhead for avatarUrl and organizations array inside DevIndex.model.Contributor.
  3. Updated apps/devindex/view/home/ProfileContainer.mjs to resolve avatarUrl from raw IDs.
  4. Refactored src/component/GitHubUser.mjs and src/component/GitHubOrgs.mjs to accept both raw IDs and full URL strings, ensuring backwards compatibility for other applications.
  5. Adapted src/grid/column/GitHubUser.mjs to fetch avatarUrl.