question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Hi @Mike-EEE, I’m experiencing a performance issue when trying to serialize pretty complex object with few dozens of items with custom serializer in list. Currently I’m unable to pinpoint it to the root cause and prepare the repro sample. However, profiler show a 25% time is spend in SetterFactory:39 lambda.Compile();

the serialize is created with

.EnableAllConstructors()
.EnableParameterizedContentWithPropertyAssignments()
.Extend(WritableParameterizedContentExtension.Default)
.EnableImplicitTyping(allTypes.Where(x => !x.CustomAttributes.Any(a => a.AttributeType == typeof(CompilerGeneratedAttribute))))
.UseOptimizedNamespaces()

Any idea what could be root cause?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:18 (13 by maintainers)

github_iconTop GitHub Comments

2reactions
jhranaccommented, Mar 19, 2020

The timings look much better now!

Version Optimized namespaces Disabled properties Optimized namespaces; disabled properties NOT optimized namespaces; properties enabled
3.1.2.3-rywdiqno 56 / 213 42 / 192 45 / 198 45 / 196

I’m happy with those results. Good job!

2reactions
jhranaccommented, Mar 18, 2020

We’re using the optimized namespaces - which in retrospect makes no sense in some of the cases so I’ll remove that. That should fix some of the performance issues for us.

Performance times - 100 iterations run to get an average. Times format: [serialize 1 element in array] / [serialize 100 elements in array] in milliseconds

Version Optimized namespaces Disabled properties Optimized namespaces; disabled properties NOT optimized namespaces; properties enabled
Release version 163 / 2272 40 / 176 40 / 184 73 / 215
Test version 140 / 369 40 / 183 43 / 175 71 / 207

So the fix you’ve done works! There is still some performance loss because the classes structure is scanned by the serializer even when a custom one is provided.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Dealing with Performance Problems
Types of Performance Problems ; Quantity of work (untimely completion, limited production). Poor prioritizing, timing, scheduling; Lost time ; Quality of work ( ......
Read more >
9 Examples of a Performance Issue
A performance issue is a failure to meet the basic requirements of a job. They are based on reasonable expectations of behavior and...
Read more >
Handling Performance Issues With Grace
Low Productivity or Late Completion – Make sure you've been clear about the requirements and expectations of the job. · Poor Quality of...
Read more >
Performance Issue Root-Cause Diagnostic
Tool Overview: Accurately assessing employee performance issues is a critical part of providing high-quality performance evaluations.
Read more >
What is a performance problem?
Generally, a performance problem is the result of some workload not getting the resources it needs to complete in time. Or the resource...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found