Skip to content

feat(fl::url): add parse_lnk() for .lnk asset link files (slice 1 of #2284) - #2286

Merged
zackees merged 1 commit into
masterfrom
worktree-feat-lnk-asset-parser
Apr 18, 2026
Merged

zackees merged 1 commit into
masterfrom
worktree-feat-lnk-asset-parser

Conversation

@zackees

@zackees zackees commented Apr 18, 2026 •

Copy link
Copy Markdown
Member

Summary

First slice of the data/ asset pipeline feature described in #2284.

  • Adds fl::parse_lnk(fl::string_view) which returns a fl::url parsed from the proposed .lnk file format (one URL per line, # comments, blank lines skipped, trailing lines reserved for future metadata).
  • Adds examples/AudioUrl/data/track.mp3.lnk so the format convention is visible in-tree alongside the existing AudioUrl sketch.
  • Adds unit tests covering plain URLs, CRLF endings, # comments, leading blanks, indented comments, trailing metadata lines, and empty input.

No behavior changes to existing code paths — UIAudio, fbuild, and the WASM runtime are untouched in this slice.

Scope — why this slice is small

The full feature (see #2284) has four independent pieces:

  1. .lnk format + parser ← this PR
  2. fbuild scan of <sketch>/data/ to emit an asset manifest (lives in the external fbuild package, separate repo)
  3. WASM runtime resolution: .lnk → fl::url → existing url JSON field on the audio element
  4. ESP32 LittleFS packing (future; requires partition-table coordination)

Landing the parser first lets downstream work (fbuild, WASM loader, fl::asset handle) target a stable format without cross-repo coordination on the parse semantics.

Test plan

  • bash test url_lnk — new test passes (9 subcases)
  • bash test url — existing URL tests still pass (no regression)
  • bash test audio_url — existing audio URL UI tests still pass
  • bash lint — clean

Follow-ups tracked in #2284

  • fl::asset(path) handle type
  • fbuild data/ scan (external fbuild package)
  • WASM runtime: fetch+parse .lnk at load time, thread resolved URL into audio element
  • ESP32 LittleFS partition generation
  • UIAudio overload accepting fl::asset

Closes: none (keeps #2284 open as the umbrella tracker)

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Added support for .lnk asset link files that declare external resource URLs, such as audio tracks and other media assets.
    • Link files support comments (lines starting with #) and blank lines for improved readability and future extensibility.

Introduces fl::parse_lnk(string_view) which parses the .lnk asset link
format proposed in #2284: the first non-comment, non-blank line of the
file is returned as a fl::url. Lines beginning with '#' are treated as
comments; trailing metadata lines are reserved for future use
(sha256=..., fallback=...) and ignored by the v1 parser for forward
compatibility.

Also adds examples/AudioUrl/data/track.mp3.lnk demonstrating the format
alongside the existing AudioUrl sketch, so the .lnk convention is
visible in-tree ahead of fbuild integration.

This is slice 1 of the feature described in #2284. Remaining pieces
(fbuild data/ scan, WASM runtime resolution, ESP32 LittleFS packing,
fl::asset handle type, UIAudio asset constructor) are tracked in the
issue and will land as follow-up PRs.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@coderabbitai

coderabbitai Bot commented Apr 18, 2026 •

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

Introduces a .lnk file format and fl::parse_lnk() parser function to handle asset link files containing URLs. The implementation supports comments, blank lines, and CRLF normalization, with future metadata extensibility. Includes example .lnk file and comprehensive test coverage.

Changes

Cohort / File(s) Summary
Core URL Parsing Implementation
src/fl/stl/url.h
Added inline fl::parse_lnk() function that parses .lnk file content line-by-line, skips comments (#) and blank lines, handles CRLF normalization, trims whitespace, and returns the first valid URL or a default invalid URL if none found.
Test Suite
tests/fl/url_lnk.cpp
Added comprehensive test file covering plain URLs, newline/CRLF variants, leading blank lines, comment lines, whitespace trimming, metadata line ignoring, and error cases (empty input, comment-only input).
Example Asset
examples/AudioUrl/data/track.mp3.lnk
Added sample .lnk link file declaring target URL for audio asset with comment guidance for future metadata extensibility.

Possibly related issues

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 A simple hop through lines so neat,
Comments skip and URLs greet!
Parse those links with carriage-free grace,
.lnk files find their perfect place! 🔗

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding a parse_lnk() function for .lnk asset link files, which is the primary feature implemented across all three modified files (url.h, url_lnk.cpp, and track.mp3.lnk example).
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch worktree-feat-lnk-asset-parser

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (2)
src/fl/stl/url.h (1)

258-294: LGTM — parser is small, correct, and handles the documented cases.

Line-by-line walk with find('\n'), CRLF strip, and whitespace trim all look right; returning default-constructed url() on no-match yields isValid() == false, matching the documented contract and the negative tests.

One small note (optional, not blocking): the doc comment on Line 250 says "one URL per line" which reads a bit ambiguously given the v1 behavior ignores all lines after the first URL. Consider tightening to e.g. "the first non-comment, non-blank line is the URL; any following lines are reserved for future metadata and ignored by v1." Purely wording.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/fl/stl/url.h` around lines 258 - 294, Update the doc comment near
parse_lnk to clarify behavior: change "one URL per line" to explicitly state
that parse_lnk returns the first non-comment, non-blank line as the URL and
ignores any following lines (reserved for future metadata) so callers know
subsequent lines are ignored in v1; reference the parse_lnk function and the
returned url() behavior in the comment.
tests/fl/url_lnk.cpp (1)

11-80: Good coverage; consider one more negative case.

Subcases cover plain, trailing \n, CRLF, leading blanks, # comments, leading/trailing whitespace trim, trailing metadata ignored, empty input, only-comments, and indented comments — nicely matches the parser's branches.

Optional additions worth considering:

  • A case with only \r\n / \n (whitespace-only, no comments) to lock in that pure-whitespace input returns an invalid url().
  • A case asserting that a line without a scheme still parses (since fl::url auto-repairs to https://) — useful to document the interaction between parse_lnk and url's wasRepaired() behavior, so a future change to either side doesn't silently shift semantics.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@tests/fl/url_lnk.cpp` around lines 11 - 80, Add two negative/behavioral
subcases to tests in the FL_TEST_CASE("fl::parse_lnk") for parse_lnk: (1) a
"whitespace-only returns invalid url" subcase that calls parse_lnk with a string
of only newlines/CRLF/space (e.g. "\r\n" or "\n   \n") and asserts the returned
url::isValid() is false; (2) a "scheme-less line is repaired to https" subcase
that calls parse_lnk with a host/path missing scheme (e.g. "example.com/path\n")
and asserts the returned url is valid and either reports wasRepaired() true or
has scheme() == "https" and host() == "example.com" to lock in the auto-repair
behavior; place these alongside the existing FL_SUBCASE blocks for parse_lnk.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@src/fl/stl/url.h`:
- Around line 258-294: Update the doc comment near parse_lnk to clarify
behavior: change "one URL per line" to explicitly state that parse_lnk returns
the first non-comment, non-blank line as the URL and ignores any following lines
(reserved for future metadata) so callers know subsequent lines are ignored in
v1; reference the parse_lnk function and the returned url() behavior in the
comment.

In `@tests/fl/url_lnk.cpp`:
- Around line 11-80: Add two negative/behavioral subcases to tests in the
FL_TEST_CASE("fl::parse_lnk") for parse_lnk: (1) a "whitespace-only returns
invalid url" subcase that calls parse_lnk with a string of only
newlines/CRLF/space (e.g. "\r\n" or "\n   \n") and asserts the returned
url::isValid() is false; (2) a "scheme-less line is repaired to https" subcase
that calls parse_lnk with a host/path missing scheme (e.g. "example.com/path\n")
and asserts the returned url is valid and either reports wasRepaired() true or
has scheme() == "https" and host() == "example.com" to lock in the auto-repair
behavior; place these alongside the existing FL_SUBCASE blocks for parse_lnk.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 0260d6d3-f97f-45a7-a067-744efd569e4c

📥 Commits

Reviewing files that changed from the base of the PR and between 50b3f5c and 755438b.

📒 Files selected for processing (3)
  • examples/AudioUrl/data/track.mp3.lnk
  • src/fl/stl/url.h
  • tests/fl/url_lnk.cpp

@zackees
zackees merged commit bd197af into master Apr 18, 2026
72 of 87 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

📊 Header Compilation Performance

Total Time: 1181.12ms

Top 5 Slowest Headers

  1. FastLED.h - 901.66ms
  2. fl/fastled.h - 387.82ms
  3. fl/task/executor.h - 296.61ms
  4. crgb.h - 220.88ms
  5. fl/gfx/crgb.h - 219.59ms

Warnings

⚠️ Header FastLED.h exceeds 150ms (901.7ms)
⚠️ Header fl/fastled.h exceeds 150ms (387.8ms)
⚠️ Header fl/task/executor.h exceeds 150ms (296.6ms)
⚠️ Header crgb.h exceeds 150ms (220.9ms)
⚠️ Header fl/gfx/crgb.h exceeds 150ms (219.6ms)
⚠️ Header fl/math/ease.h exceeds 150ms (214.6ms)
⚠️ Header fl/math/fixed_point.h exceeds 150ms (212.2ms)
⚠️ Header fl/task/scheduler.h exceeds 150ms (152.6ms)
⚠️ Header fl/stl/singleton.h exceeds 50ms (143.0ms)
⚠️ Header fl/stl/thread_local.h exceeds 50ms (142.2ms)
⚠️ Header fl/stl/thread.h exceeds 50ms (141.1ms)
⚠️ Header platforms/thread.h exceeds 50ms (141.0ms)
⚠️ Header platforms/stub/thread_stub.h exceeds 50ms (140.9ms)
⚠️ Header platforms/stub/thread_stub_stl.h exceeds 50ms (140.9ms)
⚠️ Header fl/task/promise.h exceeds 50ms (129.9ms)
⚠️ Header fl/ui.h exceeds 50ms (121.7ms)
⚠️ Header fl/stl/function.h exceeds 50ms (79.0ms)
⚠️ Header fl/stl/json.h exceeds 50ms (78.6ms)
⚠️ Header fl/math/fixed_point/s4x12.h exceeds 50ms (63.6ms)
⚠️ Header fl/stl/json/types.h exceeds 50ms (60.8ms)
⚠️ Header platforms.h exceeds 50ms (56.2ms)
⚠️ Header platforms/stub/fastled_stub.h exceeds 50ms (56.1ms)
⚠️ Template instantiation time is high (52.9%)

Full Report
================================================================================
FASTLED COMPILATION PERFORMANCE REPORT
================================================================================
Generated: 2026-04-18 02:55:56
Compiler: clang++-17
File: ci/perf/test_compile.cpp

SUMMARY
--------------------------------------------------------------------------------
Total Compilation Time:    2,209.06 ms
Frontend Time:             17.36 ms (0.8%)
Backend Time:              251.33 ms (11.4%)

COMPILATION PHASES
--------------------------------------------------------------------------------
Source                    13894.89 ms (629.0%)
Templates                   618.26 ms ( 28.0%)

FASTLED HEADERS (Level 1 - Direct Includes)
--------------------------------------------------------------------------------
  1588.2 ms - FastLED.h (SLOW)
   792.0 ms - fl/task/executor.h (SLOW)
   549.3 ms - fl/fastled.h (SLOW)
   464.7 ms - fl/task/scheduler.h (SLOW)
   455.1 ms - fl/stl/singleton.h (SLOW)
   454.3 ms - fl/stl/thread_local.h (SLOW)
   453.2 ms - fl/stl/thread.h (SLOW)
   453.1 ms - platforms/thread.h (SLOW)
   453.0 ms - platforms/stub/thread_stub.h (SLOW)
   453.0 ms - platforms/stub/thread_stub_stl.h (SLOW)
   350.3 ms - crgb.h (SLOW)
   349.0 ms - fl/gfx/crgb.h (SLOW)
   343.9 ms - fl/math/ease.h (SLOW)
   341.5 ms - fl/math/fixed_point.h (SLOW)
   313.3 ms - fl/task/promise.h (SLOW)
   263.3 ms - fl/stl/function.h (SLOW)
   192.9 ms - fl/math/fixed_point/s4x12.h (SLOW)
   172.0 ms - fl/math/sin32.h (SLOW)
   168.7 ms - fl/math/simd.h (SLOW)
   168.2 ms - fl/math/simd/types.h (SLOW)

FASTLED HEADERS (Nested Includes - Up to 10 Levels)
--------------------------------------------------------------------------------
FastLED.h (1588.2ms)
  ├─  792.0 ms - fl/task/executor.h
  │ ├─  464.7 ms - fl/task/scheduler.h
  │ │ ├─  455.1 ms - fl/stl/singleton.h
  │ │ │ └─  454.3 ms - fl/stl/thread_local.h
  │ │ │   └─  453.2 ms - fl/stl/thread.h
  │ │ │     └─  453.1 ms - platforms/thread.h
  │ │ │       └─  453.0 ms - platforms/stub/thread_stub.h
  │ │ │         └─  453.0 ms - platforms/stub/thread_stub_stl.h
  │ │ │           └─  445.2 ms - thread
  │ │ │             ├─  244.0 ms - this_thread_sleep.h
  │ │ │             └─  185.6 ms - std_thread.h
  │ │ └─    8.9 ms - fl/task/task.h
  │ │   └─    3.7 ms - fl/trace.h
  │ │     ├─    2.3 ms - fl/stl/chrono.h
  │ │     └─    1.0 ms - fl/stl/tuple.h
  │ ├─  313.3 ms - fl/task/promise.h
  │ │ ├─  263.3 ms - fl/stl/function.h
  │ │ │ ├─  144.6 ms - fl/stl/vector.h
  │ │ │ │ ├─  105.4 ms - fl/math/math.h
  │ │ │ │ │ └─   99.7 ms - fl/stl/undef.h
  │ │ │ │ │   └─  176.3 ms - stdlib.h
  │ │ │ │ │     ├─   88.1 ms - cstdlib
  │ │ │ │ │     │ └─  176.3 ms - stdlib.h
  │ │ │ │ │     │   ├─   88.1 ms - cstdlib
  │ │ │ │ │     │   ├─   12.5 ms - types.h
  │ │ │ │ │     │   └─    0.6 ms - floatn.h
  │ │ │ │ │     ├─   12.5 ms - types.h
  │ │ │ │ │     │ ├─   12.5 ms - types.h
  │ │ │ │ │     │ │ ├─   12.5 ms - types.h
  │ │ │ │ │     │ │ ├─    2.6 ms - pthreadtypes.h
  │ │ │ │ │     │ │ ├─    2.2 ms - select.h
  │ │ │ │ │     │ │ └─    2.0 ms - endian.h
  │ │ │ │ │     │ ├─    2.6 ms - pthreadtypes.h
  │ │ │ │ │     │ │ └─    2.0 ms - thread-shared-types.h
  │ │ │ │ │     │ ├─    2.2 ms - select.h
  │ │ │ │ │     │ └─    2.0 ms - endian.h
  │ │ │ │ │     └─    0.6 ms - floatn.h
  │ │ │ │ ├─   19.4 ms - fl/stl/allocator.h
  │ │ │ │ │ └─   13.2 ms - fl/stl/bitset.h
  │ │ │ │ │   └─    8.5 ms - fl/stl/bitset_dynamic.h
  │ │ │ │ │     └─    2.2 ms - fl/stl/unique_ptr.h
  │ │ │ │ ├─    8.6 ms - fl/stl/initializer_list.h
  │ │ │ │ ├─    2.8 ms - fl/stl/basic_vector.h
  │ │ │ │ └─    0.7 ms - fl/stl/functional.h
  │ │ │ ├─   61.1 ms - fl/stl/shared_ptr.h
  │ │ │ │ ├─   47.3 ms - fl/stl/type_traits.h
  │ │ │ │ │ └─   40.6 ms - fl/stl/move.h
  │ │ │ │ ├─    8.8 ms - fl/stl/atomic.h
  │ │ │ │ │ └─    7.8 ms - platforms/atomic.h
  │ │ │ │ │   └─    7.8 ms - platforms/shared/atomic.h
  │ │ │ │ └─    0.8 ms - fl/stl/bit_cast.h
  │ │ │ ├─   42.3 ms - fl/stl/variant.h
  │ │ │ │ └─   40.4 ms - fl/stl/new.h
  │ │ │ │   └─   40.4 ms - platforms/new.h
  │ │ │ │     └─   40.4 ms - platforms/shared/new.h
  │ │ │ │       └─   34.5 ms - new
  │ │ │ │         ├─   17.2 ms - c++config.h
  │ │ │ │         │ └─    5.9 ms - os_defines.h
  │ │ │ │         └─    0.5 ms - version.h
  │ │ │ ├─    4.9 ms - fl/stl/compiler_control.h
  │ │ │ └─    4.8 ms - fl/stl/algorithm.h
  │ │ │   └─    2.0 ms - fl/math/random.h
  │ │ │     └─    1.0 ms - fl/math/random8.h
  │ │ └─   44.7 ms - fl/stl/string.h
  │ │   ├─   13.1 ms - fl/stl/basic_string.h
  │ │   │ ├─    1.0 ms - fl/stl/not_null.h
  │ │   │ ├─    0.9 ms - fl/stl/iterator.h
  │ │   │ └─    0.5 ms - fl/stl/charconv.h
  │ │   ├─    8.8 ms - fl/stl/span.h
  │ │   │ └─    3.5 ms - fl/math/geometry.h
  │ │   ├─    5.8 ms - fl/stl/string_view.h
  │ │   └─    1.5 ms - fl/stl/optional.h
  │ ├─   11.5 ms - platforms/await.h
  │ │ └─   11.1 ms - platforms/coroutine_runtime.h
  │ │   └─    9.5 ms - fl/system/engine_events.h
  │ │     ├─    4.9 ms - fl/math/screenmap.h
  │ │     │ └─    3.6 ms - fl/stl/flat_map.h
  │ │     └─    3.1 ms - fl/math/xymap.h
  │ │       └─    0.8 ms - fl/math/lut.h
  │ └─    0.8 ms - fl/task/promise_result.h
  ├─  549.3 ms - fl/fastled.h
  │ ├─  350.3 ms - crgb.h
  │ │ ├─  349.0 ms - fl/gfx/crgb.h
  │ │ │ └─  343.9 ms - fl/math/ease.h
  │ │ │   └─  341.5 ms - fl/math/fixed_point.h
  │ │ │     ├─  192.9 ms - fl/math/fixed_point/s4x12.h
  │ │ │     │ ├─  172.0 ms - fl/math/sin32.h
  │ │ │     │ │ └─  168.7 ms - fl/math/simd.h
  │ │ │     │ │   └─  168.2 ms - fl/math/simd/types.h
  │ │ │     │ │     └─  167.9 ms - platforms/simd.h
  │ │ │     │ ├─    1.0 ms - fl/math/fixed_point/traits.h
  │ │ │     │ └─    0.8 ms - fl/math/fixed_point/isqrt.h
  │ │ │     ├─   18.9 ms - fl/math/fixed_point/s8x24.h
  │ │ │     ├─   18.8 ms - fl/math/fixed_point/s16x16.h
  │ │ │     ├─   18.7 ms - fl/math/fixed_point/s8x8.h
  │ │ │     └─   18.3 ms - fl/math/fixed_point/s24x8.h
  │ │ └─    0.9 ms - chsv.h
  │ │   └─    0.8 ms - fl/gfx/hsv.h
  │ ├─   88.5 ms - platforms.h
  │ │ └─   88.4 ms - platforms/stub/fastled_stub.h
  │ │   ├─   51.3 ms - platforms/stub/fastspi_stub.h
  │ │   │ └─   51.3 ms - platforms/stub/fastspi_stub_generic.h
  │ │   │   ├─   44.9 ms - platforms/shared/active_strip_data/active_strip_data.h
  │ │   │   │ └─   42.7 ms - fl/id_tracker.h
  │ │   │   │   └─   41.7 ms - fl/stl/mutex.h
  │ │   │   │     └─   41.6 ms - platforms/mutex.h
  │ │   │   │       └─   41.4 ms - platforms/stub/mutex_stub.h
  │ │   │   └─    6.0 ms - platforms/shared/active_strip_tracker/active_strip_tracker.h
  │ │   └─   37.0 ms - platforms/stub/clockless_stub.h
  │ │     └─   37.0 ms - platforms/stub/clockless_channel_stub.h
  │ │       ├─   13.2 ms - fl/system/log.h
  │ │       │ └─   12.7 ms - fl/stl/strstream.h
  │ │       ├─   13.1 ms - fl/channels/data.h
  │ │       │ └─    9.8 ms - fl/channels/config.h
  │ │       │   ├─    2.2 ms - fl/chipsets/chipset_timing_config.h
  │ │       │   │ └─    1.5 ms - fl/chipsets/led_timing.h
  │ │       │   └─    1.7 ms - fl/chipsets/spi.h
  │ │       ├─    2.4 ms - fl/channels/manager.h
  │ │       ├─    1.6 ms - fl/stl/weak_ptr.h
  │ │       └─    1.1 ms - fl/channels/driver.h
  │ ├─   42.1 ms - colorutils.h
  │ │ └─   41.3 ms - fl/gfx/colorutils.h
  │ │   ├─    8.8 ms - fl/gfx/blur.h
  │ │   │ └─    4.6 ms - fl/gfx/canvas.h
  │ │   │   └─    2.8 ms - fl/math/alpha.h
  │ │   └─    3.2 ms - fl/gfx/fill.h
  │ ├─   23.8 ms - pixel_controller.h
  │ │ ├─   17.2 ms - pixel_iterator.h
  │ │ │ └─   17.1 ms - fl/chipsets/encoders/pixel_iterator.h
  │ │ │   ├─    5.0 ms - fl/chipsets/encoders/apa102.h
  │ │ │   │ └─    3.9 ms - fl/chipsets/encoders/encoder_utils.h
  │ │ │   │   └─    3.2 ms - fl/gfx/gamma_lut.h
  │ │ │   ├─    4.6 ms - fl/chipsets/encoders/pixel_iterator_adapters.h
  │ │ │   ├─    1.0 ms - fl/chipsets/encoders/sk9822.h
  │ │ │   └─    0.9 ms - fl/chipsets/encoders/hd108.h
  │ │ └─    2.6 ms - rgbw.h
  │ │   └─    2.4 ms - fl/gfx/rgbw.h
  │ └─   22.7 ms - pixeltypes.h
  │   ├─   19.1 ms - lib8tion.h
  │   │ ├─    9.8 ms - fl/math/math8.h
  │   │ │ ├─    5.2 ms - fl/math/intmap.h
  │   │ │ │ └─    4.1 ms - platforms/intmap.h
  │   │ │ ├─    2.5 ms - fl/math/scale8.h
  │   │ │ │ └─    2.4 ms - platforms/scale8.h
  │   │ │ │   └─    1.0 ms - platforms/shared/scale8.h
  │   │ │ └─    2.1 ms - platforms/math8.h
  │   │ │   └─    1.7 ms - platforms/shared/math8.h
  │   │ ├─    2.0 ms - fl/math/beat.h
  │   │ │ └─    1.1 ms - fl/math/trig8.h
  │   │ │   └─    1.0 ms - platforms/trig8.h
  │   │ │     └─    0.9 ms - platforms/shared/trig8.h
  │   │ └─    0.5 ms - fl/math/qfx.h
  │   └─    3.3 ms - crgb.hpp
  ├─  121.4 ms - fl/ui.h
  │ ├─   78.2 ms - fl/stl/json.h
  │ │ └─   60.3 ms - fl/stl/json/types.h
  │ │   └─    7.4 ms - fl/stl/limits.h
  │ ├─   10.4 ms - fl/ui_impl.h
  │ │ └─    9.8 ms - platforms/ui_defs.h
  │ │   ├─    2.2 ms - platforms/shared/ui/json/audio.h
  │ │   │ └─    1.0 ms - platforms/shared/ui/json/audio_internal.h
  │ │   ├─    1.6 ms - platforms/shared/ui/json/button.h
  │ │   │ └─    0.6 ms - platforms/shared/ui/json/ui_internal.h
  │ │   ├─    0.9 ms - platforms/shared/ui/json/checkbox.h
  │ │   ├─    0.9 ms - platforms/shared/ui/json/help.h
  │ │   └─    0.8 ms - platforms/shared/ui/json/dropdown.h
  │ └─    6.8 ms - fl/stl/url.h
  ├─   29.5 ms - fl/stl/stdint.h
  │ └─   29.2 ms - platforms/int.h
  │   └─   28.7 ms - platforms/shared/int.h
  │     └─   28.6 ms - platforms/shared/int_linux.h
  └─   28.7 ms - chipsets.h
    ├─   11.6 ms - fl/chipsets/ucs7604.h
    │ └─    8.7 ms - fl/chipsets/encoders/ucs7604.h
    ├─    6.7 ms - fl/chipsets/apa102.h
    ├─    1.7 ms - fl/chipsets/lpd880x.h
    ├─    1.0 ms - fl/chipsets/encoders/ws2816.h
    └─    0.9 ms - fl/chipsets/p9813.h
fl/task/executor.h (792.0ms)
  ├─  464.7 ms - fl/task/scheduler.h
  │ ├─  455.1 ms - fl/stl/singleton.h
  │ │ └─  454.3 ms - fl/stl/thread_local.h
  │ │   └─  453.2 ms - fl/stl/thread.h
  │ │     └─  453.1 ms - platforms/thread.h
  │ │       └─  453.0 ms - platforms/stub/thread_stub.h
  │ │         └─  453.0 ms - platforms/stub/thread_stub_stl.h
  │ │           └─  445.2 ms - thread
  │ │             ├─  244.0 ms - this_thread_sleep.h
  │ │             │ ├─  229.4 ms - chrono.h
  │ │             │ └─    4.9 ms - cerrno
  │ │             └─  185.6 ms - std_thread.h
  │ │               ├─   63.8 ms - tuple
  │ │               ├─   29.7 ms - iosfwd
  │ │               ├─   22.5 ms - refwrap.h
  │ │               ├─   12.4 ms - gthr.h
  │ │               └─    6.3 ms - unique_ptr.h
  │ └─    8.9 ms - fl/task/task.h
  │   └─    3.7 ms - fl/trace.h
  │     ├─    2.3 ms - fl/stl/chrono.h
  │     └─    1.0 ms - fl/stl/tuple.h
  ├─  313.3 ms - fl/task/promise.h
  │ ├─  263.3 ms - fl/stl/function.h
  │ │ ├─  144.6 ms - fl/stl/vector.h
  │ │ │ ├─  105.4 ms - fl/math/math.h
  │ │ │ │ └─   99.7 ms - fl/stl/undef.h
  │ │ │ │   └─  176.3 ms - stdlib.h
  │ │ │ │     ├─   88.1 ms - cstdlib
  │ │ │ │     │ └─  176.3 ms - stdlib.h
  │ │ │ │     │   ├─   88.1 ms - cstdlib
  │ │ │ │     │   │ └─  176.3 ms - stdlib.h
  │ │ │ │     │   ├─   12.5 ms - types.h
  │ │ │ │     │   │ ├─   12.5 ms - types.h
  │ │ │ │     │   │ ├─    2.6 ms - pthreadtypes.h
  │ │ │ │     │   │ ├─    2.2 ms - select.h
  │ │ │ │     │   │ └─    2.0 ms - endian.h
  │ │ │ │     │   └─    0.6 ms - floatn.h
  │ │ │ │     ├─   12.5 ms - types.h
  │ │ │ │     │ ├─   12.5 ms - types.h
  │ │ │ │     │ │ ├─   12.5 ms - types.h
  │ │ │ │     │ │ │ ├─   12.5 ms - types.h
  │ │ │ │     │ │ │ ├─    2.6 ms - pthreadtypes.h
  │ │ │ │     │ │ │ ├─    2.2 ms - select.h
  │ │ │ │     │ │ │ └─    2.0 ms - endian.h
  │ │ │ │     │ │ ├─    2.6 ms - pthreadtypes.h
  │ │ │ │     │ │ │ └─    2.0 ms - thread-shared-types.h
  │ │ │ │     │ │ ├─    2.2 ms - select.h
  │ │ │ │     │ │ └─    2.0 ms - endian.h
  │ │ │ │     │ ├─    2.6 ms - pthreadtypes.h
  │ │ │ │     │ │ └─    2.0 ms - thread-shared-types.h
  │ │ │ │     │ ├─    2.2 ms - select.h
  │ │ │ │     │ └─    2.0 ms - endian.h
  │ │ │ │     └─    0.6 ms - floatn.h
  │ │ │ ├─   19.4 ms - fl/stl/allocator.h
  │ │ │ │ └─   13.2 ms - fl/stl/bitset.h
  │ │ │ │   └─    8.5 ms - fl/stl/bitset_dynamic.h
  │ │ │ │     └─    2.2 ms - fl/stl/unique_ptr.h
  │ │ │ ├─    8.6 ms - fl/stl/initializer_list.h
  │ │ │ ├─    2.8 ms - fl/stl/basic_vector.h
  │ │ │ └─    0.7 ms - fl/stl/functional.h
  │ │ ├─   61.1 ms - fl/stl/shared_ptr.h
  │ │ │ ├─   47.3 ms - fl/stl/type_traits.h
  │ │ │ │ └─   40.6 ms - fl/stl/move.h
  │ │ │ ├─    8.8 ms - fl/stl/atomic.h
  │ │ │ │ └─    7.8 ms - platforms/atomic.h
  │ │ │ │   └─    7.8 ms - platforms/shared/atomic.h
  │ │ │ └─    0.8 ms - fl/stl/bit_cast.h
  │ │ ├─   42.3 ms - fl/stl/variant.h
  │ │ │ └─   40.4 ms - fl/stl/new.h
  │ │ │   └─   40.4 ms - platforms/new.h
  │ │ │     └─   40.4 ms - platforms/shared/new.h
  │ │ │       └─   34.5 ms - new
  │ │ │         ├─   17.2 ms - c++config.h
  │ │ │         │ └─    5.9 ms - os_defines.h
  │ │ │         │   └─    5.4 ms - features.h
  │ │ │         └─    0.5 ms - version.h
  │ │ ├─    4.9 ms - fl/stl/compiler_control.h
  │ │ └─    4.8 ms - fl/stl/algorithm.h
  │ │   └─    2.0 ms - fl/math/random.h
  │ │     └─    1.0 ms - fl/math/random8.h
  │ └─   44.7 ms - fl/stl/string.h
  │   ├─   13.1 ms - fl/stl/basic_string.h
  │   │ ├─    1.0 ms - fl/stl/not_null.h
  │   │ ├─    0.9 ms - fl/stl/iterator.h
  │   │ └─    0.5 ms - fl/stl/charconv.h
  │   ├─    8.8 ms - fl/stl/span.h
  │   │ └─    3.5 ms - fl/math/geometry.h
  │   ├─    5.8 ms - fl/stl/string_view.h
  │   └─    1.5 ms - fl/stl/optional.h
  ├─   11.5 ms - platforms/await.h
  │ └─   11.1 ms - platforms/coroutine_runtime.h
  │   └─    9.5 ms - fl/system/engine_events.h
  │     ├─    4.9 ms - fl/math/screenmap.h
  │     │ └─    3.6 ms - fl/stl/flat_map.h
  │     └─    3.1 ms - fl/math/xymap.h
  │       └─    0.8 ms - fl/math/lut.h
  └─    0.8 ms - fl/task/promise_result.h
fl/fastled.h (549.3ms)
  ├─  350.3 ms - crgb.h
  │ ├─  349.0 ms - fl/gfx/crgb.h
  │ │ └─  343.9 ms - fl/math/ease.h
  │ │   └─  341.5 ms - fl/math/fixed_point.h
  │ │     ├─  192.9 ms - fl/math/fixed_point/s4x12.h
  │ │     │ ├─  172.0 ms - fl/math/sin32.h
  │ │     │ │ └─  168.7 ms - fl/math/simd.h
  │ │     │ │   └─  168.2 ms - fl/math/simd/types.h
  │ │     │ │     └─  167.9 ms - platforms/simd.h
  │ │     │ │       └─  167.9 ms - platforms/shared/simd_x86.hpp
  │ │     │ ├─    1.0 ms - fl/math/fixed_point/traits.h
  │ │     │ └─    0.8 ms - fl/math/fixed_point/isqrt.h
  │ │     ├─   18.9 ms - fl/math/fixed_point/s8x24.h
  │ │     ├─   18.8 ms - fl/math/fixed_point/s16x16.h
  │ │     ├─   18.7 ms - fl/math/fixed_point/s8x8.h
  │ │     └─   18.3 ms - fl/math/fixed_point/s24x8.h
  │ └─    0.9 ms - chsv.h
  │   └─    0.8 ms - fl/gfx/hsv.h
  ├─   88.5 ms - platforms.h
  │ └─   88.4 ms - platforms/stub/fastled_stub.h
  │   ├─   51.3 ms - platforms/stub/fastspi_stub.h
  │   │ └─   51.3 ms - platforms/stub/fastspi_stub_generic.h
  │   │   ├─   44.9 ms - platforms/shared/active_strip_data/active_strip_data.h
  │   │   │ └─   42.7 ms - fl/id_tracker.h
  │   │   │   └─   41.7 ms - fl/stl/mutex.h
  │   │   │     └─   41.6 ms - platforms/mutex.h
  │   │   │       └─   41.4 ms - platforms/stub/mutex_stub.h
  │   │   │         └─   41.4 ms - platforms/stub/mutex_stub_stl.h
  │   │   └─    6.0 ms - platforms/shared/active_strip_tracker/active_strip_tracker.h
  │   └─   37.0 ms - platforms/stub/clockless_stub.h
  │     └─   37.0 ms - platforms/stub/clockless_channel_stub.h
  │       ├─   13.2 ms - fl/system/log.h
  │       │ └─   12.7 ms - fl/stl/strstream.h
  │       ├─   13.1 ms - fl/channels/data.h
  │       │ └─    9.8 ms - fl/channels/config.h
  │       │   ├─    2.2 ms - fl/chipsets/chipset_timing_config.h
  │       │   │ └─    1.5 ms - fl/chipsets/led_timing.h
  │       │   └─    1.7 ms - fl/chipsets/spi.h
  │       ├─    2.4 ms - fl/channels/manager.h
  │       ├─    1.6 ms - fl/stl/weak_ptr.h
  │       └─    1.1 ms - fl/channels/driver.h
  ├─   42.1 ms - colorutils.h
  │ └─   41.3 ms - fl/gfx/colorutils.h
  │   ├─    8.8 ms - fl/gfx/blur.h
  │   │ └─    4.6 ms - fl/gfx/canvas.h
  │   │   └─    2.8 ms - fl/math/alpha.h
  │   └─    3.2 ms - fl/gfx/fill.h
  ├─   23.8 ms - pixel_controller.h
  │ ├─   17.2 ms - pixel_iterator.h
  │ │ └─   17.1 ms - fl/chipsets/encoders/pixel_iterator.h
  │ │   ├─    5.0 ms - fl/chipsets/encoders/apa102.h
  │ │   │ └─    3.9 ms - fl/chipsets/encoders/encoder_utils.h
  │ │   │   └─    3.2 ms - fl/gfx/gamma_lut.h
  │ │   ├─    4.6 ms - fl/chipsets/encoders/pixel_iterator_adapters.h
  │ │   ├─    1.0 ms - fl/chipsets/encoders/sk9822.h
  │ │   └─    0.9 ms - fl/chipsets/encoders/hd108.h
  │ └─    2.6 ms - rgbw.h
  │   └─    2.4 ms - fl/gfx/rgbw.h
  └─   22.7 ms - pixeltypes.h
    ├─   19.1 ms - lib8tion.h
    │ ├─    9.8 ms - fl/math/math8.h
    │ │ ├─    5.2 ms - fl/math/intmap.h
    │ │ │ └─    4.1 ms - platforms/intmap.h
    │ │ ├─    2.5 ms - fl/math/scale8.h
    │ │ │ └─    2.4 ms - platforms/scale8.h
    │ │ │   └─    1.0 ms - platforms/shared/scale8.h
    │ │ └─    2.1 ms - platforms/math8.h
    │ │   └─    1.7 ms - platforms/shared/math8.h
    │ ├─    2.0 ms - fl/math/beat.h
    │ │ └─    1.1 ms - fl/math/trig8.h
    │ │   └─    1.0 ms - platforms/trig8.h
    │ │     └─    0.9 ms - platforms/shared/trig8.h
    │ └─    0.5 ms - fl/math/qfx.h
    └─    3.3 ms - crgb.hpp
fl/ui.h (121.4ms)
  ├─   78.2 ms - fl/stl/json.h
  │ └─   60.3 ms - fl/stl/json/types.h
  │   └─    7.4 ms - fl/stl/limits.h
  ├─   10.4 ms - fl/ui_impl.h
  │ └─    9.8 ms - platforms/ui_defs.h
  │   ├─    2.2 ms - platforms/shared/ui/json/audio.h
  │   │ └─    1.0 ms - platforms/shared/ui/json/audio_internal.h
  │   ├─    1.6 ms - platforms/shared/ui/json/button.h
  │   │ └─    0.6 ms - platforms/shared/ui/json/ui_internal.h
  │   ├─    0.9 ms - platforms/shared/ui/json/checkbox.h
  │   ├─    0.9 ms - platforms/shared/ui/json/help.h
  │   └─    0.8 ms - platforms/shared/ui/json/dropdown.h
  └─    6.8 ms - fl/stl/url.h
fl/stl/stdint.h (29.5ms)
  └─   29.2 ms - platforms/int.h
    └─   28.7 ms - platforms/shared/int.h
      └─   28.6 ms - platforms/shared/int_linux.h

TOP 20 SLOWEST OPERATIONS
--------------------------------------------------------------------------------
  1.  1588.2 ms - Source: FastLED.h
  2.  1588.2 ms - Total Source: 
  3.   792.0 ms - Source: fl/task/executor.h
  4.   655.6 ms - Total ParseClass: 
  5.   549.3 ms - Source: fl/fastled.h
  6.   464.7 ms - Source: fl/task/scheduler.h
  7.   455.1 ms - Source: fl/stl/singleton.h
  8.   454.3 ms - Source: fl/stl/thread_local.h
  9.   453.2 ms - Source: fl/stl/thread.h
 10.   453.1 ms - Source: platforms/thread.h
 11.   453.0 ms - Source: platforms/stub/thread_stub.h
 12.   453.0 ms - Source: platforms/stub/thread_stub_stl.h
 13.   445.2 ms - Source: thread
 14.   350.3 ms - Source: crgb.h
 15.   349.0 ms - Source: fl/gfx/crgb.h
 16.   343.9 ms - Source: fl/math/ease.h
 17.   341.5 ms - Source: fl/math/fixed_point.h
 18.   313.3 ms - Source: fl/task/promise.h
 19.   263.3 ms - Source: fl/stl/function.h
 20.   244.0 ms - Source: this_thread_sleep.h

PERFORMANCE FLAGS
--------------------------------------------------------------------------------
⚠️  SLOW HEADERS (>50.0ms):
    - FastLED.h (1588.2ms)
    - fl/task/executor.h (792.0ms)
    - fl/fastled.h (549.3ms)
    - fl/task/scheduler.h (464.7ms)
    - fl/stl/singleton.h (455.1ms)
    - fl/stl/thread_local.h (454.3ms)
    - fl/stl/thread.h (453.2ms)
    - platforms/thread.h (453.1ms)
    - platforms/stub/thread_stub.h (453.0ms)
    - platforms/stub/thread_stub_stl.h (453.0ms)

⚠️  Template instantiation time is high (28.0% of total)
✓  Lexing time is acceptable (<10% of total)

RECOMMENDATIONS
--------------------------------------------------------------------------------
1. Consider optimizing FastLED.h (1588.2ms)
2. Consider optimizing fl/task/executor.h (792.0ms)
3. Consider optimizing fl/fastled.h (549.3ms)

================================================================================

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