Skip to content
This repository was archived by the owner on Feb 10, 2023. It is now read-only.
This repository was archived by the owner on Feb 10, 2023. It is now read-only.

Improve performance for certain /web/ routes #126

@mellowagain

Description

@mellowagain

I'm currently measuring execution time of the major parts of Shiro including routes and handlers. Most of the routes and handlers execute in less than 1ms which is already faster than all publicly available osu!Bancho re-implementations. This is good and reaches our expectations and goals very clearly. Here are the logs from the performance regression: shiro 2019-05-18 13:24:39.log

The following handlers however did not perform to the expectations and need to be optimized / redesigned to perform better:

  • web::get_scores::handle: If the beatmap is already fetched and in the database, execution time is from 4ms (no scores) up to 22ms (many scores and filtering) which is acceptable. However, for beatmaps which need to be fetched from the osu!api this takes at least 200ms up to even 1s.
  • web::submit_score::handle: Consistently takes over 900ms up to 1.1s to execute.

The above two cases need to be optimized for a seamless player experience. Please discuss below ways on how we would go on and optimize these methods.

Machine this performance regression was executed on

Hardware:
CPU: AMD Ryzen 5 1600 (12) @ 3.200GHz
Memory: 16'052MiB (~16 GB) DDR4 2800MHz
Graphics Card: NVIDIA GeForce GTX 1060 6GB
Disk: Shiro was run off an HDD

Software:
OS: Arch Linux
Kernel: Linux Zen 5.0.10-zen1-1-zen
Compiler: Clang 8.0.0
Mode: Debug (unoptimized)
MySQL: 10.3.14-MariaDB

Metadata

Metadata

Assignees

Labels

project: execution timeImproving execution time of major Shiro methods (#126)type: suggestionIssues which suggest various features

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions