[Refactor] Performance optimization

- Put download token in memory database
- Accelerate multiple querying in `best_score` table
This commit is contained in:
Lost-MSth
2022-11-01 18:08:02 +08:00
parent e04c8ecf2d
commit cf350842ac
11 changed files with 168 additions and 137 deletions

View File

@@ -73,7 +73,7 @@ def favicon():
@app.route('/download/<path:file_path>', methods=['GET']) # 下载
def download(file_path):
with Connect() as c:
with Connect(in_memory=True) as c:
try:
x = UserDownload(c)
x.token = request.args.get('t')