Skip to content

fix: Removed per-tick runtime allocations by reusing memory between ticks#640

Merged
JesseOlmer merged 2 commits intorelease/0.1.0from
fix/MTT-550-remove-profiler-allocations
Mar 18, 2021
Merged

fix: Removed per-tick runtime allocations by reusing memory between ticks#640
JesseOlmer merged 2 commits intorelease/0.1.0from
fix/MTT-550-remove-profiler-allocations

Conversation

@becksebenius-unity
Copy link
Copy Markdown
Contributor

No description provided.

Copy link
Copy Markdown
Member

@NoelStephensUnity NoelStephensUnity left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link
Copy Markdown
Contributor

@JesseOlmer JesseOlmer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PerformanceTickData.AddNonDuplicateData also allocates unnecessarily with its Where clause if you want to take care of that one as well?

Also... tests?

@becksebenius-unity
Copy link
Copy Markdown
Contributor Author

PerformanceTickData.AddNonDuplicateData also allocates unnecessarily with its Where clause if you want to take care of that one as well?

Also... tests?

Yeah, I can add that fix in as well.

RE: Tests, we don't have any automated tests for this yet, but I ran through a set of profiler acceptance tests after this change to make sure data was still reporting correctly

Copy link
Copy Markdown
Contributor

@JesseOlmer JesseOlmer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@JesseOlmer JesseOlmer enabled auto-merge (squash) March 18, 2021 16:06
@kvassall-unity
Copy link
Copy Markdown
Contributor

PerformanceTickData.AddNonDuplicateData also allocates unnecessarily with its Where clause if you want to take care of that one as well?

Also... tests?

@JesseOlmer @becksebenius-unity Got something like tests up and going here
#642

Comment on lines -20 to +24
foreach (var entry in nonDuplicates)
foreach (var entry in transportProfilerData)
{
if (m_TickData.HasData(entry.Key))
{
continue;
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this fine now. the function name makes it clear enough

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, and also +1 as we've been talking about moving away from LINQ in the library

@JesseOlmer JesseOlmer merged commit 3047068 into release/0.1.0 Mar 18, 2021
@JesseOlmer JesseOlmer deleted the fix/MTT-550-remove-profiler-allocations branch March 18, 2021 16:43
0xFA11 added a commit that referenced this pull request Mar 23, 2021
* fix: implement warning logs on non-owner invoking ServerRpc that requires ownership (#627)

* add todo comments

* fix: implement warning logs on non-owner invoking ServerRpc that requires ownership

* fix: Correcting the profiler names for network vars to be appropriately named. Should address issue #605 (#632)

* test: NetworkTickSystem test (#630)

* test: NetworkTickSystem test

* test: NetworkTickSystem test, removed unneeded code

* fix: Fix object traversal assigning instanceIds to none scene objects (#629)

* fix: Fix object traversal assigning instanceIds to none scene objects

* comment added

Co-authored-by: Matt Walsh <[email protected]>

* fix: Correcting the profiler names for named messages vars to be appropriately named. Should address issue #604 (#634)

* fix: prevent OnPerformanceTickData from sending data on null (#614)

If something causes an exception it's possible that the profiler never allocates data. in these cases, there is no point in sending data outside of MLAPI

* fix: use specified transport channel instead of hardcoded reliablerpc channel (#638)

* docs: added release notes to changelog.md (#569)

* Add release notes to changelog

* docs: added release notes to changelog

* Update com.unity.multiplayer.mlapi/CHANGELOG.md

Co-authored-by: Luke Stampfli <[email protected]>

* update per review for bitserializer and networkserializer

* revised per feedback - API refactor

* update remove bitserializer

* renaming

* Update com.unity.multiplayer.mlapi/CHANGELOG.md

Co-authored-by: M. Fatih MAR <[email protected]>

* Update com.unity.multiplayer.mlapi/CHANGELOG.md

* Update com.unity.multiplayer.mlapi/CHANGELOG.md

* added known issues and scene mgmt fix

* revisions per review

* profiler final - no more updates

* format

Co-authored-by: Luke Stampfli <[email protected]>
Co-authored-by: Matt Walsh <[email protected]>
Co-authored-by: M. Fatih MAR <[email protected]>

* docs: Update repository/project docs (#636)

- Mirror package readme.md in root readme.md
- Add repo directory structure description
- Remove contributing and code of conduct from package directory

* docs: Add content for mlapi manual.md (#639)

resolves #553
resolves MTT-534

* fix: Removed per-tick runtime allocations by reusing memory between ticks (#640)

PerformanceDataManager reuses PerformanceTickData by resetting per-frame
Replaces deferred linq query in PerformanceTickData loop.

* fix: fixed network activity occurring outside the core update getting missed in the profiler (#641)

Co-authored-by: Matt Walsh <[email protected]>

* fix: Resolve an issue where 2019.4 would not properly run ILPP with a clean import (#645)

* Add an dummy ILPP to force 2019.4 to proper compilation order

* Turning on this test for 2019.4

* Hack -> Workaround rename

Co-authored-by: Matt Walsh <[email protected]>
Co-authored-by: Matt Walsh <[email protected]>

* build: add Unity module dependencies explicitly (#648)

Co-authored-by: kvassall-unity <[email protected]>
Co-authored-by: Jeffrey Rainy <[email protected]>
Co-authored-by: Albin Corén <[email protected]>
Co-authored-by: Matt Walsh <[email protected]>
Co-authored-by: Lori Krell <[email protected]>
Co-authored-by: Luke Stampfli <[email protected]>
Co-authored-by: Matt Walsh <[email protected]>
Co-authored-by: Jesse Olmer <[email protected]>
Co-authored-by: becksebenius-unity <[email protected]>
Co-authored-by: Andrew Spiering <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants