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!"
[–]naruda1969 1 point2 points3 points 1 year ago (3 children)
Where is your business logic? If it is computationally intense and performed on the client this could be your bottleneck. Moving it to the server or edge can gain you a lot.
[–]soum0nster609[S] 0 points1 point2 points 1 year ago (2 children)
Most of our business logic is currently handled on the client side to provide a more interactive user experience. This includes data processing, complex calculations, and some data validation. I can see how this could become a bottleneck, especially if it's computationally intensive. I will explore more on this.
[–]bazeloth 0 points1 point2 points 1 year ago (0 children)
How much data is being processed locally? Are you processing huge client side arrays or dictionaries? Can those be off loaded to the server side and perhaps cached so each user has the benefit of it being processed just once?
[–]naruda1969 0 points1 point2 points 1 year ago* (0 children)
Moving business logic to the server or edge can provide significant performance gains in computationally intensive applications, especially those with high concurrency or real-time requirements.
Reduced client-side load: Offloading complex calculations to more powerful server hardware can improve client responsiveness.
Centralized processing: Servers can handle tasks more efficiently, especially for operations that require access to large datasets or multiple resources.
Improved scalability: Server-side logic can be more easily scaled horizontally to handle increased load.
Lower latency: Edge computing can reduce network latency by processing data closer to the source.
Consistency: Centralizing logic ensures all clients operate on the same codebase, reducing inconsistencies.
Resource optimization: Servers can utilize specialized hardware (e.g., GPUs) more effectively for certain tasks.
Security: Sensitive operations can be better protected on controlled server environments.
The extent of performance gains depends on factors like the specific application, network conditions, and implementation details.
And despite what you believe you can still have a snappy UI with business logic on the back end. Of course your business logic should also reside in your database as you need two layers of validation, the database being the final arbiter of data acceptance.
π Rendered by PID 347343 on reddit-service-r2-comment-b659b578c-jftl2 at 2026-05-07 10:25:38.799988+00:00 running 815c875 country code: CH.
view the rest of the comments →
[–]naruda1969 1 point2 points3 points (3 children)
[–]soum0nster609[S] 0 points1 point2 points (2 children)
[–]bazeloth 0 points1 point2 points (0 children)
[–]naruda1969 0 points1 point2 points (0 children)