openfrontio / openfrontio/OpenFrontIO

Optimize bulk upgrade a bit

Open
#4,946 1 comment 0 reactions 1 assignee Claimed by @VariableVince View on GitHub
approved
Dominant language
TypeScript
Stars
2.7k
Forks
1.4k
Avg merge
17h 43m
Merged PRs (30d)
310

Description

## Purpose

Make bulk upgrade code path faster to possibly help on older devices, especially when hovering a number of upgradeable structures.

## Objectives

Optimized bulk upgrade costs loop within buildableUnits.

## Description

Bulk upgrade optimizations. Start loop at n=1, n=0 is same as known const const. Fetch owned/constructed types once so it isn't done 50 times within costWrapper, from the upgradeCosts loop.

## Assignment

- [x] I'd like to be assigned to this issue and work on it myself

---

tryout33

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.