OpenRA icon indicating copy to clipboard operation
OpenRA copied to clipboard

ProductionQueue, cache MostLikelyProducer?

Open anvilvapre opened this issue 3 years ago • 1 comments

version bleed

The two classic production queue classes each contain 3 similar looking LINQ queries. In two of them items are sorted by two columns. One of them is MostLikelyProducer.

MostLikelyProducer seems to be called by multiple caller amongst which the ProductionPaletteWidget.

Proposal/question:

  1. Can't the MostLikelyProducer be cached per logic tick? Or could it cause bugs depending on the order in which logic is executed and i.e. ticks on later actors may influence the result.

  2. Can't the two or three/four queries turned into one or two? Tick, MostLikelyProducer, BuildUnit, GetBuildTime.

anvilvapre avatar Aug 16 '21 21:08 anvilvapre