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

Support more serialization data types + Fixed out of memory issue #104

Merged
merged 4 commits into from
May 25, 2023

Conversation

necosta
Copy link
Contributor

@necosta necosta commented May 25, 2023

Adding support for Option, List, Set and Map still WIP, want to better understand why so much memory used on this logic.

Performance improvement on ScalaSerialDescriptor, some out of memory issues seen on tests done by @Yawolf yesterday, should now be fixed.

@necosta
Copy link
Contributor Author

necosta commented May 25, 2023

To better understand: Kotlin/kotlinx.serialization#1274

@@ -24,19 +24,16 @@ object ScalaSerialDescriptor:

private inline def getSerialDescriptor[T <: Tuple]: List[SerialDescriptor] = inline erasedValue[T] match
case _: EmptyTuple => Nil
case _: (h *: t) =>
summonInline[ClassTag[h]].runtimeClass match {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Did an analysis with a JVM profiler, this call was killing performance, creating OOM exceptions in some cases. A better look, we don't need this logic at all, we can just work with type matching.

@necosta necosta changed the title WIP: Support more serialization data types Support more serialization data types May 25, 2023
@necosta necosta changed the title Support more serialization data types Support more serialization data types + Fixed memory issue May 25, 2023
@necosta necosta changed the title Support more serialization data types + Fixed memory issue WIP: Support more serialization data types + Fixed memory issue May 25, 2023
@necosta necosta changed the title WIP: Support more serialization data types + Fixed memory issue Support more serialization data types + Fixed out of memory issue May 25, 2023
@necosta necosta requested a review from nomisRev May 25, 2023 10:00
Copy link
Contributor

@raulraja raulraja left a comment

Choose a reason for hiding this comment

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

Looks great @necosta ! thanks!

Copy link
Contributor

@Yawolf Yawolf left a comment

Choose a reason for hiding this comment

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

@necosta necosta merged commit 0970f12 into main May 25, 2023
1 check passed
@necosta necosta deleted the feature/support_all_data_types branch May 25, 2023 10:50
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.

None yet

3 participants