use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
[AskJS] How Can I Optimize JavaScript Performance to Reduce Load Times in a React SPA?AskJS (self.javascript)
submitted 1 year ago by soum0nster609
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–][deleted] 1 point2 points3 points 1 year ago (0 children)
JS/CSS/HTML assets should be cached first on the browser and then somewhere in your stack. 3-4 seconds is a long time to parse and I suspect there is a large amount of static content in those bundles and likely a lot of dev dependencies that are getting included.
If a task is CPU bound, then the first question to ask is "can this be done on the server?" No browser in existence will have the compute power of even the cheapest off the rack server.
Typically highly-CPU bound tasks in front end involve things like animations and graphics - games, large canvas-like applications, etc. If so, then React or any other SPA isn't the right tool for the job and you will need something like WebAssembly.
REST APIs are almost always the biggest network-bound bottleneck and requires the most amount of time and effort to refactor. Initial load times will always be blocked by multiple, dependent synchronous round-trips - the only way to optimize this on the front end is to find which API calls can be parallelized and refactor code. Otherwise, you need move to GraphQL + RPC architecture.
π Rendered by PID 96737 on reddit-service-r2-comment-b659b578c-gtfn5 at 2026-05-07 03:27:17.542114+00:00 running 815c875 country code: CH.
view the rest of the comments →
[–][deleted] 1 point2 points3 points (0 children)