• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

dart-lang / tools / 23099652318
94%

Build:
DEFAULT BRANCH: main
Ran 15 Mar 2026 12:28AM UTC
Jobs 1
Files 54
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

12 Mar 2026 08:33PM UTC coverage: 95.976% (-0.7%) from 96.628%
23099652318

push

github

web-flow
Optimize LineScanner newline detection and fix backwards position bug (#2342)

- Replaced RegExp reliance in `LineScanner` (such as `_newlinesIn`) with manual code unit iteration to avoid unnecessary allocations and scanning overhead.
- Improved performance in core loop methods (`readChar`, `scanChar`, `scan`) which directly cascades to `SpanScanner`.
- Fixed a `RangeError` bug when setting `position` backwards across a `\r\n` boundary by completely rewriting the bounded boundary-checking loop.
- Added a benchmark script to measure raw throughput improvements.
- Added comprehensive test coverage in `line_scanner_test.dart` for backwards boundary traversal.

### Performance Comparison

| Benchmark Target | Before (us) | After (us) | Change (%) | Status |
| :--- | :--- | :--- | :--- | :--- |
| **StringScanner readChar** | 16,790 | 16,430 | -2.1% | Minor Improv. |
| **LineScanner readChar** | 57,328 | 55,491 | -3.2% | Minor Improv. |
| **SpanScanner readChar** | 49,400 | 50,158 | +1.5% | Slight Regression |
| **StringScanner scan** | 1,103,350 | 1,102,107 | -0.1% | Negligible |
| **LineScanner scan** | 2,185,230 | 1,338,592 | **-38.7%** | **Major Win** |
| **SpanScanner scan** | 1,209,363 | 1,198,558 | -0.9% | Minor Improv. |

1574 of 1640 relevant lines covered (95.98%)

3.67 hits per line

Jobs
ID Job ID Ran Files Coverage
1 23099652318.1 15 Mar 2026 12:28AM UTC 54
95.98
GitHub Action Run
Source Files on build 23099652318
  • Tree
  • List 54
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • d50b9a86 on github
  • Prev Build on main (#23099495995)
  • Next Build on main (#23100011580)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc