Commit Graph

29487 Commits

Author SHA1 Message Date
RoosterDragon
4a02e6c6cc Improve Exts.GetOrAdd method to avoid multiple lookups.
Use CollectionsMarshal to hold a ref to the dictionary entry. When the value needs to be added this allows us to set the value directly into it without having to locate the entry a second time.
2023-07-17 20:12:48 +02:00
RoosterDragon
d6a31bb0cc MiniYaml performance tweaks.
- Seal the classes, and make SourceLocation a readonly struct.
- In ToDictionary, use TryAdd to avoid a try-catch.
- In Merge, use ToList to ensure sources is only enumerated once.
2023-07-17 20:12:48 +02:00
RoosterDragon
f5daa19a1c Improve MiniYaml MergePartial performance.
- Track plain keys in a set, to avoid quadratic searches for plain node keys.
- Avoid the Concat iterator by looping twice instead.
2023-07-17 20:12:48 +02:00
RoosterDragon
a96e445e4d Handle duplicate nodes key checks in MiniYaml in a better place.
Moving the key duplication check allows a redundant check on top-level nodes to be avoided. Add tests to ensure key checks are functioning as expected.
2023-07-17 20:12:48 +02:00
RoosterDragon
30b1f926f2 Improve performance of MiniYaml inheritance tree tracking.
Use an ImmutableDictionary to avoid having to clone the inheritance tree in ResolveInherits. This avoids a lot of dictionary clones.
2023-07-17 20:12:48 +02:00
RoosterDragon
58e8b123db Avoid some allocations during loading.
- In FieldLoader, cache boxed bools and some boxed ints.
- In FieldLoader, presize collections when parsing a List, HashSet or Dictionary.
- In FieldLoader, don't allocate a list of missing items until required.
- In FieldLoader, when a string value is passed, avoid wrapping this in a MiniYaml object by allowing both strings and yaml to be passed in the GetValue overload that does the real work.
- In Animation, avoid allocating no-op actions.
- In VxlReader, use EnsureCapcity to better size the Dictionary.
- In VxlReader change VxlElement to a struct.
- In Locomotor, presize TerrainSpeeds dictionary.
2023-07-16 23:21:20 +02:00
RoosterDragon
be04d232c0 Avoid some allocations on the large object heap during loading.
- In MixFile, the Distinct call doesn't presize the HashSet it uses internally. As we know we will enumerate all results, create the HashSet ourselves so that is it presized correctly.
- In ObjectCreator, stream the assembly when hashing rather than reading all bytes into memory.

These changes avoid some allocations on the large object heap, in turn this means the GC can avoid performing unnecessary Gen 2 collections just to clear down the LOH.
2023-07-16 23:21:20 +02:00
Gustas
659ec5e335 Make phase transport uncloak on loading cargo 2023-07-14 17:25:30 +02:00
Paul Chote
7f37454666 Include Linux DE in OS sysinfo string. 2023-07-13 14:34:38 +03:00
michaeldgg2
433d69af7a Make Voiced trait conditional 2023-07-10 18:05:56 +03:00
Matthias Mailänder
21c21e4963 Update OpenAL. 2023-07-07 23:47:32 +02:00
RoosterDragon
1c0885c636 Improve loading performance for loader/compression classes.
- In RLEZerosCompression use dedicated Array.Clear method instead of open-coded loop.
- In VoxelLoader.GenerateSlicePlanes.Get use TryGetValue to avoid repeated array and dictionary lookups.
- In TmpTSLoader.UnpackTileData use ReadBytes to populate array with less overhead compared to repeated one byte reads.
- Resolve TODO in VqaVideo.
2023-07-07 22:36:54 +03:00
michaeldgg2
dccb3ce9ce Added extensibility points to LayMines activity:
Provides two callbacks using INotifyMineLaying interface: MineLaying (just before laying a mine), MineLaid after mine actor has been created (in FrameEndTask)
2023-07-04 23:52:25 +02:00
michaeldgg2
22b39f35aa Mine + related classes are public 2023-07-04 23:52:25 +02:00
michaeldgg2
5ab3276a2d Moved Minelaying related traits and activity to Common 2023-07-04 23:52:25 +02:00
penev92
36420114e0 Fixed packaging for Windows missing assembly info
Apparently building/publishing/packaging for Windows on Linux using .NET 6 sets some of the assembly / Portable Executable information for the generated DLL, but nothing for the generated EXE (which isn't the case when building on Windows).
2023-07-04 20:53:49 +01:00
penev92
7cda031888 Added product version to assembly info 2023-07-04 20:53:49 +01:00
penev92
fc85a4864d Added project information in Directory.Build.props 2023-07-04 20:53:49 +01:00
Gustas
99226c3df5 Always have ActorReference string on optional arrays instantiated 2023-07-01 18:29:59 +02:00
Gustas
ed395c8ace Fix linter crashing on null actor array references 2023-07-01 18:29:59 +02:00
Vapre
edbded8f0a PerfTickLogger, reduce overhead of logging long ticks. 2023-07-01 18:07:27 +02:00
abcdefg30
c095690619 Fix combined sequences using frames being broken 2023-07-01 12:56:50 +02:00
dnqbob
628cc837ef Fix a crash when RallyPoint creates RallyPointIndicator 2023-07-01 12:51:54 +02:00
RoosterDragon
0c32fca6c0 Fix slow saving of map previews.
Avoid quadratic behaviour when searching through actors by creating a dictionary lookup outside the loop.
2023-07-01 12:48:32 +02:00
IceReaper
56b5ace109 WSA use a Framerate of 15, source: FFMPEG. 2023-06-26 19:49:51 +02:00
IceReaper
5572650da2 Video FrameRate is now taken into account when video has no audio. 2023-06-26 19:49:51 +02:00
IceReaper
41669d246f Videos no longer use more vram then required. 2023-06-26 19:49:51 +02:00
abcdefg30
49c837e7d0 Fix \r\n-style line endings not being properly handled for script errors 2023-06-26 19:36:47 +02:00
RoosterDragon
bc5e7d1497 Compress all pngs within oramap files.
Reduces size used for oramap files from 2,774,405 bytes to 2,614,332 bytes in total. The smaller files also improve loading times as the zlib decoder has less bytes to schlep through.

The PNG decoder shipped with OpenRA only supports a bit depth of 8 for images with a palette, so must must ensure that other depths (1,2 or 4) are not used.

zopfilpng is used for compression with the following command line:
'zopflipng.exe --keepcolortype -y -m image.png image.png'

The keepcolortype flag ensures the bit depth is not changed.

The oramap files were updated by:
- Saving as a folder, unpacking the data in loose files.
- Compressing the png files using the command above.
- Saving back as an oramap, except instead of regenerating the map preview on save we save the existing version on disk.
2023-06-26 19:28:06 +02:00
RoosterDragon
78bef8a98f Compress all pngs.
Reduces size used for png files from 19,034,446 bytes to 13,305,798 bytes in total. The smaller files also improve loading times as the zlib decoder has less bytes to schlep through.

The PNG decoder shipped with OpenRA only supports a bit depth of 8 for images with a palette, so must must ensure that other depths (1,2 or 4) are not used.

zopfilpng is used for compression with the following command line:
'zopflipng.exe --keepcolortype -y -m image.png image.png'

The keepcolortype flag ensures the bit depth is not changed.
2023-06-26 19:28:06 +02:00
RoosterDragon
4f3d8f4caa Fix Png parsing.
A regression from 06df75ffee causes this parsing to fail depending on how the image was compressed.
2023-06-26 19:28:06 +02:00
Paul Chote
0369f7516d Work around Gnome 44 titlebar bug. 2023-06-26 19:21:51 +02:00
Gustas
3b0415678c RA Naval balance 2023-06-26 19:13:41 +02:00
Gustas
69867b6c06 Fix EMP'ed units turning 2023-06-21 20:55:52 +02:00
RoosterDragon
231bf01f18 Fix CA1854 2023-06-20 17:57:40 +02:00
RoosterDragon
56fe08cb00 Disable CA1845 2023-06-20 17:57:40 +02:00
RoosterDragon
f752e04b03 Fix CA1816 2023-06-20 17:57:40 +02:00
RoosterDragon
a50e72f68d Fix CA1802 2023-06-20 17:57:40 +02:00
RoosterDragon
0958197df2 Fix CA1052 2023-06-20 17:57:40 +02:00
RoosterDragon
f336a956cf Fix CA1012 2023-06-20 17:57:40 +02:00
darkademic
19fa03435b Only consider non-paused armaments (if any exist) when determining min/max range. 2023-06-20 16:46:21 +02:00
RoosterDragon
fa65e7fd3f Bump Linguini.Bundle to 0.5.0.
This version contains performance improvements for the parser, improving the loading time of translations.
2023-06-15 17:48:37 +02:00
RoosterDragon
f794cf69f9 In TypeDictionary.TrimExcess, also TrimExcess on the internal data dictionary size.
As TypeDictionary instances tend to live a long time without edits after being initially populated, this will reduce their long term memory footprint.
2023-06-13 23:52:44 +02:00
RoosterDragon
366dc5383c In HierarchicalPathFinder.BuildGrid, presize and reuse accessible cell set.
Most cells are accessible, so presizing to the full size of the grid is sensible to avoid allocations to resize as it is filled up. The set can also be reused across all layers to avoid allocating it many times.
2023-06-13 23:52:44 +02:00
michaeldgg2
fd2b14f464 DrawLineToTarget: made palette for rendering sprites customizable (and thus optional too) 2023-06-12 21:10:52 +03:00
Matthias Mailänder
590976a8e7 Add support for Wayland. 2023-06-12 19:57:35 +02:00
Paul Chote
bdbb651b98 Remove unused sequences and an awkward Combine. 2023-06-11 22:04:43 +02:00
Paul Chote
703618be19 Remove obsolete x64 and x64process sysinfo columns. 2023-06-11 13:18:49 +02:00
Paul Chote
1f37728ecf Return proper sysinfo OS names for Linux/macOS. 2023-06-11 13:18:49 +02:00
penev92
d955efff14 Updated configure-system-libraries for new OpenAL 2023-06-11 10:41:02 +02:00