lythx / trakman

Trackmania Forever server controller written in TypeScript
https://trakman.ptrk.eu
MIT License
24 stars 4 forks source link

Dynamic map loading #251

Closed felacek closed 4 months ago

felacek commented 4 months ago

Support for a very large amount of maps. It was tested with over 220 000 maps and can handle them without big issues (the only problem is very slow searching, which can completely halt the controller for up to 20 seconds).

I believe the search algorithm can be sped up in the future.

The code in MapService has gotten slightly uglier, but that can be fixed by implementing actual dependency injection in the future (because fully static classes are also not the paragon of pulchritude).

Also implemented: full bun support, small bugfixes, faster inserting of maps into the database using COPY.

felacek commented 4 months ago

Achieved a speed up of 30% (189 seconds instead of 274 for 50k maps) in parsing.

felacek commented 4 months ago

yeah what i said there

Done