Akryum / Akryum/awesomejs.dev

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

Đang mở
#7 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
bug
Ngôn ngữ chính
Vue
Star
207
Fork
21
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

**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)

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.