How to solve super slow loading time for site?

Was spending a long time optimizing my CSS, removing plugins, removing redirects, everything I can to improve load times but apparently the main culprits are:

mobile_4-randomcharacters-.css, which contains normalize.css and Pikaday and loads at 1.5 seconds on mobile
and /assets/ember_jquery-randomcharacter-.js which loads in 3.6 seconds on mobile

I have no idea what to do about these files, which having the highest loading time.

Desktop loading is faster, but not great.
Server is on 1 CPU 2 GB RAM 50 GB SSD 2 TB bandwidth on a professional US based server
2 unicorn workers, neither CPU nor RAM are under heavy load, and I dont have many users or plugins
Any ideas? thanks

Measured using https://developers.google.com/speed/pagespeed/insights/

Those are static assets, and to optimize delivery of those you should Enable a CDN for your Discourse

thank you, https://developers.google.com/speed/pagespeed/insights/ says the CPU time (not delivery time) specifically for the second asset was almost 4 seconds, will a CDN like fastly still help with that? I currently use cloudflare with caching, is there a tweak on cloudflare I should use or just add something like fastly on top?!

That is indeed a big asset that will take time to parse and evaluate. As Discourse is a “Single Page Application” that cost is all paid upfront when the user first arrive, and this is a trade-off of our the approach, which is focused on making all the subsequent interaction, typical of forum usage, lightweight.

There are plan for EmberJS to drop mandatory JQuery, which will reduce this payload a fair bit, but we are years away of making this transition in Discourse.

thanks for the response, I think something must be off with my configuration, as i have never heard anyone else reporting those load times

Well, the pagespeed defaults force a Nexus 5X and a 3G connection, which even for Brazil (a third world country) is on the low end for today standards, so real world performance will depend on that.

안녕하세요, Hetzner 서버(CPX21, 3 vCPU, 4GB RAM)에 Discourse를 새로 설치했습니다. 사용 중인 가이드는 다음과 같습니다: discourse/docs/INSTALL-cloud.md at main · discourse/discourse · GitHub

서버 성능 통계에는 거의 부하가 표시되지 않는데도 URL 로딩에 매우 오랜 시간이 걸립니다. 일부 컴포넌트가 캐시에 존재했음에도 불구하고, 익명 방문자(인코그니토 모드) 기준 로딩 시간이 1.2분이나 걸렸습니다. 가장 느렸던 것은 1분 이상 걸린 OpenSans ttf 폰트 파일들이었고, 그다음으로 여러 .js 컴포넌트가 30~45초를 소요했습니다.

캐싱 옵션을 살펴볼 예정이지만, 해당 컴포넌트들을 보면 모두 캐싱이 가능한 것은 아닌 것 같습니다. 총 데이터 전송량은 고작 730KB에 불과합니다. 3개 vCPU가 모두 풀로동작하고 있었다면 더 빠른 서버로 이전하는 것을 고려했을 텐데, 부하가 거의 없거나 전혀 없는 상태에서 이런 현상이 발생하니 당혹스럽습니다.

다른 요소를 대기하다가 진행이 지연되는 부분이 있을까요? DB와 같은 컴포넌트의 상태를 확인하기 위해 서버에서 테스트를 실행할 방법이 있을까요?
Docker가 성능 저하를 일으키고 있을까요?

저도 같은 문제를 겪고 있습니다.
2코어 4GB RAM 환경의 Ubuntu에 신규 설치하고 Cloudflare 캐시를 사용했는데도 로딩이 매우 느립니다.

app.yml 설정은 기본값인 db_shared_buffers: "1024MB"와 UNICORN_WORKERS: 4로 되어 있습니다.

여전히 로딩이 느린데, 이는 정상적인 상황이 아닙니다. 이를 해결하기 위해 어떤 설정을 조정해야 할까요?

htop ss를 확인해 보니 서버 문제인 것 같지 않습니다.

미니 프로파일러에서 몇 가지 통계를 공유하는 것이 좋을 것 같습니다

아래 글도 읽어보시는 것을 추천합니다.
Discourse installation has been getting slower and slower and slower
.