mapbox / mapbox/vector-tile-cs

Performance profiling results

Open
#29 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
64
Forks
38
PR merge metrics
No merged PRs in 30d

Description

I was testing my own changes&performance and decided to share this as well.

![2017-03-30_00-16-04](https://cloud.githubusercontent.com/assets/1465390/24477039/38cce994-14de-11e7-8bbd-9f454d9b8af6.png)

This frame took 981ms GetFeature takes 153 of that. Few things to note;
- First of all, I thought we were using clipper for 16+ levels. It seems like it's working at 16 as well? Do we need it at 16- levels?
- Yes it's mostly clipper but still there are bunch of easy improvements for slow days
- Where & Select, or let's say linq in general, little slow and makes probably unnecessary allocations
- List size changes are actually costly, I haven't checked this one but at my side, I started calculating the size and creating them with that size which saved me from all those array copying.
- ToList is extremely slow. And it's even following a select statement (for tags). Is ConvertAll slower? (I couldn't re-test as profiler is actually quite slow in deep-profile mode)

I'll post if I can find anything else!

cc @BergWerkGIS

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review the profiling image and the reported GetFeature, clipper, LINQ/Select, list sizing, ToList, and ConvertAll hotspots. Before changing anything, turn one hotspot into a reproducible measurement; done would require a scoped optimization with verified profiling results, but this issue does not define a specific target or test.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
performance
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.