Commit Graph

10 Commits

Author SHA1 Message Date
RoosterDragon
82bea961ba Checked LINQ queries and collections for inefficiencies.
- Made Array.IndexOf available via extension method.
- Made ToHashSet extension method.
- Change collections queried often via Contains into sets.
- Avoid Count() extension if Count or Length property exist.
- Made Count() > 0 checks and variations calls to Any() instead.
- Don't call ToList/ToArray if there is no benefit to materializing the sequence.
- If the sequence does benefit from materialization, follow this general pattern:
  - Collection queried often via Contains use ToHashSet to speed up lookups.
  - Short lived variables use ToList. This is because ToArray requires an extra copy to output the final size.
  - Collections persisted into fields or for a long time use ToArray to minimize memory overhead.
2015-01-29 19:20:11 +00:00
abcdefg30
8ca61aa917 Updated all year numbers 2015-01-09 21:18:05 +01:00
Matthias Mailänder
bc3acfeee7 StyleCop clean OpenRA.Game 2015-01-04 15:38:54 +01:00
Hellhake
b6410bc1e0 Fix StyleCop warnings in OpenRA.Mods.RA 2015-01-02 14:39:49 +01:00
Paul Chote
4f44cc1969 Load assets using absolute paths. Fixes #6717. 2014-10-11 11:02:30 +13:00
Matthias Mailänder
443b46ca64 fix Tiberian Sun installation from CD 2014-07-06 14:04:26 +02:00
Paul Chote
3f7293b206 Let FieldLoader do the hard work of loading fields. 2014-07-06 14:04:26 +02:00
Matthias Mailänder
dbb4132b66 add TrimOrEmpty to avoid NREs 2014-07-06 14:04:25 +02:00
Matthias Mailänder
cc64b41246 fix Tiberian Dawn CD rip logic
closes #4424
2014-07-06 14:04:25 +02:00
Matthias Mailänder
14f71c55bf unify install from CD logic 2014-07-06 14:04:25 +02:00