Akryum / Akryum/awesomejs.dev

Slow performance on field ProjectType.packages if github/npm metadata has expired

未關閉
#7 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
bug
主要語言
Vue
星號
207
分支
21
PR 合併指標
30 天內沒有已合併 PR

描述

**Describe the bug**
When the metadata is considered expired (currently after 6 hours), the resolver fetches new data from both NPM and GitHub APIs, slowing down the whole query. This work should be offloaded to a parallel "job" and old data shall be returned immediately unless there isn't any metadata (freshly added package).

**To Reproduce**
Steps to reproduce the behavior:
1. Wait 6 hours
2. Refresh a project type view page

**Expected behavior**
Lightning fast loading :zap:

**Screenshots**

Here we can see a 1.7s long example on Apollo Engine:

![image](https://user-images.githubusercontent.com/2798204/66685093-ce6ea100-ec7b-11e9-8761-31d802152cb6.png)

貢獻指南

這個儲存庫沒有索引到貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。