nuxt / nuxt/nuxt.com

Nuxt.com loads immense amounts of JSON

Open
#1,538 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
TypeScript
Stars
457
Forks
272
Avg merge
13h 33m
Merged PRs (30d)
23

Description

Problem

Two of the API requests, /search and /contributors, load around 16 MB of JSON in total. It may slow down the performance of the page

Steps to reproduce:

  1. Open Network tab
  2. Set Fetch/XHR filter
  3. Set "disable cache"
  4. Navigate to https://nuxt.com/
  5. Sort by request size

Actual result

https://nuxt.com/api/search.json endpoint returns 515 KB/12.5 MB compressed/uncompressed JSON data. It is not inspectable, Chrome refuses to show Response due to its size

https://api.nuxt.com/contributors returns 375 KB/ 3.7 MB compressed/uncompressed JSON data.
Result contains array of 22787 values. My guess this can be limited to 1000 at most,
Current grid of supporters on page shows 20 faces every 5 seconds. 1000 should suffice for 4 minutes spent on page.

image

Expected result

Only necessary data is sent to the page

Contributor guide

Open the contributing guide

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

Reproduce the issue on nuxt.com using the Network tab, Fetch/XHR filter, and disabled cache, then inspect the /search and /contributors requests. Trace where those responses are produced and define the minimum data needed by the page; done means the page still works while both payloads are materially smaller.

Written by the indexing model from the issue text.

Assessment

Tech stack
nuxt, typescript
Domain
api, frontend, performance
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.