Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V1 #53

Merged
merged 18 commits into from
Oct 9, 2023
Merged

V1 #53

merged 18 commits into from
Oct 9, 2023

Conversation

matigramirez
Copy link
Owner

@matigramirez matigramirez commented Oct 9, 2023

This PR contains several internal and public API changes which include:

  • Reflection is no longer used for reading/writing, instead, each class has its own Read/Write method defined manually
  • Classes no longer have custom constructors, instead, they implement the ISerializable interface which makes the Read and Write methods available
  • When serializing a format, a single SBinaryWriter instance is used and all subclasses write their data through it, this avoid all the memory allocations which were a consequence of the multiple GetBytes method invocations
  • The static Reader class was renamed to ParsecReader, and its methods were renamed from ReadFromXXXX to FromXXXX, i.e. Parsec.ReadFromFile -> ParsecReader.FromFile
  • The ItemDefinitionEp5 and ItemDefinitionEp6 classes were merged into a single ItemDefinition class
  • Files can now be read with a specific encoding by passing it to the FromXX method

Overall, the public API hasn't changed much, but the internal changes resulted in reducing memory allocations and improved the performance considerably.

@codecov
Copy link

codecov bot commented Oct 9, 2023

Codecov Report

Attention: 260 lines in your changes are missing coverage. Please review.

Files Coverage Δ
src/Parsec/Extensions/ListExtensions.cs 100.00% <100.00%> (ø)
src/Parsec/Helpers/FileHelper.cs 57.89% <ø> (ø)
src/Parsec/Shaiya/3dc/_3dc.cs 100.00% <100.00%> (ø)
src/Parsec/Shaiya/3dc/_3dcBone.cs 100.00% <100.00%> (ø)
src/Parsec/Shaiya/3dc/_3dcVertex.cs 100.00% <100.00%> (ø)
src/Parsec/Shaiya/3de/_3de.cs 100.00% <100.00%> (ø)
src/Parsec/Shaiya/3de/_3deFrame.cs 100.00% <100.00%> (ø)
src/Parsec/Shaiya/3de/_3deVertex.cs 100.00% <100.00%> (ø)
src/Parsec/Shaiya/3de/_3deVertexFrame.cs 100.00% <100.00%> (ø)
src/Parsec/Shaiya/3do/_3do.cs 100.00% <100.00%> (ø)
... and 148 more

📢 Thoughts on this report? Let us know!.

@matigramirez matigramirez merged commit 1914ff5 into main Oct 9, 2023
4 checks passed
@matigramirez matigramirez deleted the v1 branch October 9, 2023 16:39
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.

1 participant