perf: reduce latency when create/delete resumes
Opened this issue · 0 comments
xiaohanyu commented
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:
create-delete-resume-latency.mp4
[Optional] Possible Solutions
Right now when user create or delete resumes, we send two requests:
POST /resumes
orDELETE /resumes/:slug
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
- the UI latency for create/delete resumes should be removed
Todo list
NA