Skip to content

perf: skip tokenisation#193

Merged
noahbald merged 5 commits intomainfrom
perf/skip-tokenisation
Nov 22, 2025
Merged

perf: skip tokenisation#193
noahbald merged 5 commits intomainfrom
perf/skip-tokenisation

Conversation

@noahbald
Copy link
Owner

@noahbald noahbald commented Nov 22, 2025

Description

Updates parsing on non-css attribute values that don’t need tokenisation with csssparser.

Motivation and Context

Further improves performance of parsing documents and reduces the risk of data-loss.

Given we usually know the exact type and length of an input, we can pull from the value as-is.

How Has This Been Tested?

  • Unit tests
  • w3c & oxygen
---
config:
    xyChart:
        width: 622
        height: 181

---
xychart horizontal
    title "Performance change (ms)"
    x-axis [Oxygen, w3c]
    y-axis "Time (ms)" 0 --> 32
    %% Before
    bar [31.8, 0.9]
    %% After
    bar [19.5, 0.1]
Loading

Types of changes

Tests

  • more coverage of attribute parsing

Features

  • added basic parser to oxvg_parse
  • put lightningcss parsing behind a feature flag
  • rewrite path parser to use oxvg_parse parser

Breaking changes

  • path api updated slightly to reduce clones

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@noahbald noahbald force-pushed the perf/skip-tokenisation branch from 75efe64 to 2aef584 Compare November 22, 2025 12:18
@noahbald noahbald force-pushed the perf/skip-tokenisation branch from 2aef584 to 129fbde Compare November 22, 2025 12:25
@noahbald noahbald merged commit db798b8 into main Nov 22, 2025
21 checks passed
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.

1 participant