ppresume / community

Discussions, feedbacks, roadmaps, community for PPResume.
https://blog.ppresume.com
Creative Commons Attribution 4.0 International
87 stars 3 forks source link

perf: reduce latency when create/delete resumes #91

Open xiaohanyu opened 4 months ago

xiaohanyu commented 4 months ago

Description

Right now there's 2-4 seconds latency when users create or delete resumes, we can optimize this and give users instant feedbacks.

Demo:

https://github.com/user-attachments/assets/df25627c-9fbd-4a57-8047-14ec4c66b62b

[Optional] Possible Solutions

Right now when user create or delete resumes, we send two requests:

  1. POST /resumes or DELETE /resumes/:slug
  2. GET /resumes for a refetch of all resumes and refresh the whole resume list

We can instead, first update the zustand resumes store when create/delete resumes (this would be instant), and then after POST /resumes or DELETE /resumes/:slug respond, we check the status code and act accordingly.

Acceptance Criteria

Todo list

NA