You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@answer.apache.org by "surapuramakhil (via GitHub)" <gi...@apache.org> on 2024/02/27 08:44:53 UTC
[I] React Frontend - Issue with being progressive web app. Adding 12 seconds latency [incubator-answer]
surapuramakhil opened a new issue, #809:
URL: https://github.com/apache/incubator-answer/issues/809
## Describe the bug
It looks Entire JS code getting dumped in one JS file. That loading is synchronous / blocking next level of fetches.
It adds 12 seconds of additional latency. That's pretty bad for user experience.
This is for my site where I am not using any CDN.

### To Reproduce
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
### Expected behavior
A clear and concise description of what you expected to happen.
### Screenshots
If applicable, add screenshots or video to help explain your problem.
### Platform
- Device: [e.g. Desktop, Mobile]
- OS: [e.g. macOS]
- Browser and version: [e.g. Chrome, Safari]
- Version: [e.g. v1.2.0]
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@answer.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] React Frontend - Issue with being progressive web app. Adding 12 seconds latency [incubator-answer]
Posted by "surapuramakhil (via GitHub)" <gi...@apache.org>.
surapuramakhil commented on issue #809:
URL: https://github.com/apache/incubator-answer/issues/809#issuecomment-1975629678
@shuashuai No, I am not on Slow 3G (that's related to throttling feature of Edge stimulate running on slow internet). My internet speeds are actually over 150 MBPS.
My internet speed results

--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@answer.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] React Frontend - Issue with being progressive web app. Adding 12 seconds latency [incubator-answer]
Posted by "surapuramakhil (via GitHub)" <gi...@apache.org>.
surapuramakhil commented on issue #809:
URL: https://github.com/apache/incubator-answer/issues/809#issuecomment-1975653117
I understood "why you said that". It's a stimulation (DevTools feature of Microsoft Edge)
and coming to this
> I will split main.js
I would recommend exploring other build tools. Checkout other popular react projects on GitHub.
Apache Superset uses "webpack" https://github.com/apache/superset/blob/master/superset-frontend/package.json
freeCodeCamp uses "getsBy" https://github.com/freeCodeCamp/freeCodeCamp/blob/main/client/package.json
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@answer.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] React Frontend - Issue with being progressive web app. Adding 12 seconds latency [incubator-answer]
Posted by "shuashuai (via GitHub)" <gi...@apache.org>.
shuashuai commented on issue #809:
URL: https://github.com/apache/incubator-answer/issues/809#issuecomment-1975564960
First of all, this is due to the packaging method of create-react-app. CRA will package all used node_modules packages into main.js; and main.js will return to the seat entry file to load the page and display the functions within the page,main.js will be used as the entry file of the application to load the page and display the functions within the page. All core logic is completed in main.js。
Secondly, React is a JavaScript library for rendering user interfaces (UI) rather than a progressive web App, of course you can use CRA to build PWA applications.
Finally, the real core of the problem here is that main.js is indeed a bit large. If the user does not enable http caching, or the network conditions are not good, it will cause the file to take too long to load,in response to this situation,I will split main.js in one of the next releases, so please be patient.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@answer.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] React Frontend - Issue with being progressive web app. Adding 12 seconds latency [incubator-answer]
Posted by "surapuramakhil (via GitHub)" <gi...@apache.org>.
surapuramakhil commented on issue #809:
URL: https://github.com/apache/incubator-answer/issues/809#issuecomment-1970922086
@fenbox Ah, it's actually a bug. React is a progressive web App. This feature comes out of the box for almost all major front-end frameworks like Vue, angular, svelte not just React. Unless configurations are messed or explicitly disabled, this won't be the case.
This could be transitive effect of this https://github.com/apache/incubator-answer/issues/784
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@answer.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] React Frontend - Issue with being progressive web app. Adding 12 seconds latency [incubator-answer]
Posted by "shuashuai (via GitHub)" <gi...@apache.org>.
shuashuai commented on issue #809:
URL: https://github.com/apache/incubator-answer/issues/809#issuecomment-1975644561
> @shuashuai No, I am not on Slow 3G (that's related to throttling feature of Edge stimulate running on slow internet). My internet speeds are actually over 150 MBPS.
>
> My internet speed results 
I saw it from your screenshot

--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@answer.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] React Frontend - Issue with being progressive web app. Adding 12 seconds latency [incubator-answer]
Posted by "fenbox (via GitHub)" <gi...@apache.org>.
fenbox closed issue #809: React Frontend - Issue with being progressive web app. Adding 12 seconds latency
URL: https://github.com/apache/incubator-answer/issues/809
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@answer.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org