Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

网站优化需求/策略 #104

Open
garyyeap opened this issue Aug 13, 2024 · 3 comments
Open

网站优化需求/策略 #104

garyyeap opened this issue Aug 13, 2024 · 3 comments

Comments

@garyyeap
Copy link
Contributor

garyyeap commented Aug 13, 2024

最近看的时候很不稳定,常常请求超时,想问一下是不是有优化(减少浏览器对伺服器的请求)的需求?
目前想到的方案:

  1. 用 vite-ssg 产生小说(含内容)初始页面静态档,用 cloudflare 等 cdn 来做前端缓存,后续 ajax 操作照旧
  2. 目前想到的读取的动态数据就是 toc 章节已读/未读状态,
    解决方案看可不可以改 api 把 toc 已读独立出来存在 localstorage,
    显示时一律从 localstorage 读取,在背景同步 localstorage 跟伺服器数据。

以上应该可以确保在无需对伺服器请求的情况下靠 cdn 缓存完整读完一部小说,同时大幅降低对伺服器的请求。

@FishHawk
Copy link
Owner

最近请求超时是由多方面原因共同导致的,主要原因是数据库结构问题,获取翻译任务需要扫一遍章节,很卡。现在正在修。
不过这个issue可以开着。

@garyyeap
Copy link
Contributor Author

好的,如果有需要我可以帮忙处理这功能(可能会需要数据库,但可以用 dummy 资料)

@FishHawk
Copy link
Owner

没事,正在以龟速推进。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants