Closed mohsen1 closed 2 years ago
Speed issues have been fixed, so this shouldnt be a problem anymore
@crowlKats I don't think this is fast enough.
There are a few things going on here:
We will continue to try to improve things, and I will take a specific look at the page you are pointing out to see if we are not caching as expected, but we closed this issue as it was posted before we specifically implemented improvements to the caching in the API layer.
Thank you for explaining! Hope my positive intent is obvious. I want Deno land to be fast because I love Deno!
Since there is a finite number of files on denoland, wouldn't it make sense to warm the cache beforehand? Maybe not for all files but partially based on historic view patterns?
Of course you positive intent is obvious.
We currently have 3.6 million symbols in modules index and about 2 million modules that can be doc'ed, and already have lazily cached 190k pages. So there is a finite number of files, but not small finite number.
We are working on a caching layer for Deploy that will give us the ability to persist some of "hot" pages in a LRU cache that is globally distributed and shared between deployments. That will help in part.
The only thing that is realistic in the near term though, thinking about what you mentioned, is that when an author publishes a new version, we clear down all the cached pages and other data for all the previous versions, as that data references the "latest" version. We can and should rebuild those pages for the index and default root modules for that module, as that is the most time consuming part we have control over.
I'm browsing from Barcelona, Spain
Visiting https://deno.land/x/fresh@1.0.0/www is extremely slow (more than ~2 seconds page load time)
Non-HTML assets load pretty fast. Just to prove it's not my network etc
HAR
har file
```json { "log": { "version": "1.2", "creator": { "name": "WebKit Web Inspector", "version": "1.0" }, "pages": [ { "startedDateTime": "2022-06-29T22:32:02.235Z", "id": "page_0", "title": "https://deno.land/x/fresh@1.0.0/www", "pageTimings": { "onContentLoad": 127207.40608332562, "onLoad": 127351.99941665633 } } ], "entries": [ { "pageref": "page_0", "startedDateTime": "2022-06-29T22:32:02.235Z", "time": 3028.204767848365, "request": { "method": "GET", "url": "https://deno.land/x/fresh@1.0.0/www", "httpVersion": "HTTP/2", "cookies": [], "headers": [ { "name": "Accept", "value": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" }, { "name": "Accept-Encoding", "value": "gzip, deflate, br" }, { "name": "Host", "value": "deno.land" }, { "name": "User-Agent", "value": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.5 Safari/605.1.15" }, { "name": "Accept-Language", "value": "en-US,en;q=0.9" }, { "name": "Referer", "value": "https://deno.land/x/fresh@1.0.0" }, { "name": "Connection", "value": "keep-alive" } ], "queryString": [], "headersSize": 235, "bodySize": 0 }, "response": { "status": 200, "statusText": "", "httpVersion": "HTTP/2", "cookies": [], "headers": [ { "name": "Content-Encoding", "value": "gzip" }, { "name": "Date", "value": "Wed, 29 Jun 2022 22:32:05 GMT" }, { "name": "Content-Type", "value": "text/html; charset=utf-8" }, { "name": "Vary", "value": "Accept-Encoding" }, { "name": "Content-Length", "value": "14299" }, { "name": "Server", "value": "deno/europe-southwest1-a" } ], "content": { "size": 50996, "compression": 36688, "mimeType": "text/html", "text": "x/fresh@1.0.0/www
fresh website
This is the fresh website source. The fresh website contains:
\n\n- a homepage
\n- a documentation page
\n
\nUsage
Start the project:
\nThis will watch the project directory and restart as necessary.
\n