nuts-foundation / nuts-foundation/nuts-node
General performance issue
Open
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 28
- Forks
- 23
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 76
Description
While looking into some performance challenges I noticed some slow operations or at least operations that can cause peak load.
- JSON-LD processing is really slow. The json-gold library creates the context and validates VCs every time. The validating step does a lot of regexes.
- we do a lot of json (un)marshalling. For VC/JSON-LD processing, DID resolving and internals where we marshal/unmarshal to/from interface{}
- the memory allocations for json processing also causes GC cycles.
There are some quick fixes:
- cache DID resolve after unmarshal
- fork json-gold and disable some validation checks
- check functions/methods on
interface{}arguments and remove some of the marshal/unmarshal operations where possible.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by profiling JSON-LD processing, DID resolving, and the VC/JSON-LD paths that marshal or unmarshal through interface{}. Compare the cost of json-gold validation, repeated DID resolution, and JSON allocations before choosing a focused change; done should be demonstrated by lower measured latency, peak load, or allocation and GC costs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- backend, performance
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100