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

Backtrace data models serialization optimization #144

Open
wants to merge 116 commits into
base: master
Choose a base branch
from

Conversation

BartoszLitwiniuk
Copy link
Collaborator

@BartoszLitwiniuk BartoszLitwiniuk commented Aug 13, 2024

Summary

This PR introduces a comprehensive refactor of the Backtrace data models in the Android SDK. The key objectives are to enhance code maintainability, improve serialization/deserialization processes, and ensure robust unit testing.

Key Changes

  • Refactored existing data models for clarity and performance.
  • Improved serialization and deserialization mechanisms.
  • Added new unit tests to increase code coverage.
  • Android context is now extracted from BacktraceData class and passed only once on initialization.
  • BacktraceData should be initialized using builder class
  • Removed deprecated and unused code.
  • Enhanced documentation and code comments for better readability.
  • Added final keyword in multiple places to emphasize immutability, for safety and to improve performance
  • BacktraceResult has been split into two classes, BacktraceApiResult which parsing REST API response and BacktraceResult is wrapper for BacktraceApiResult with additional informations like instance of report which was sent. Processing of field response is now improved and correctly processed inside API.
  • Minor improvements in unit tests

Impact

This change affect all models which we are serializing and deserializing. This refactor aims to optimize performance and reliability while simplifying future development and debugging processes.

Ref: BT-2922

@BartoszLitwiniuk BartoszLitwiniuk marked this pull request as ready for review October 23, 2024 15:35
Copy link

@perf2711 perf2711 left a comment

Choose a reason for hiding this comment

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

There are a lot files without newlines appended to them. Consider updating your IDE settings to add a newline automatically.

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.

4 participants