Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Tokenizing a file with a lot of nested open arrays takes almost a minute

Open
#55 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
csharp

Research direction

Reproduce tokenization using formats/json-tests/jvmTest/resources/spec_cases/n_structure_open_array_object.json and n_structure_100000_opening_arrays.json from the linked Kotlin repository, comparing them with the sub-millisecond files. Trace the tokenizer entry point to identify why deeply nested open arrays are slow; done means these files no longer take seconds to tokenize without changing tokenization results.

Written by the indexing model from the issue text.

Description

When tokenizing the files in the https://github.com/Kotlin/kotlinx.serialization repo, the cl100k_base tokenizer struggled on the following files:

While the rest of the files usually took less than a millisecond.

Dominant language
C#
Stars
213
Forks
37
Avg merge
5d 1h
Merged PRs (30d)
5

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.

More from microsoft/Tokenizer

All issues in microsoft/Tokenizer

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.