Skip to content

Cascadia Code unexpected complexity analysis result #411

@skyline75489

Description

@skyline75489

Environment

Cascadia Code version number: 2009.22
Application (with version) used to display text: Windows Terminal dev branch
OS platform and version: 10.0.19042.804
Screen resolution (i.e. 220dpi):  4K @ 200% 

Any other software? No

Steps to reproduce

Running cmatrix in Windows Terminal with no font specified (fallback to Cascadia Mono, I think) & Hack.

Expected behavior

The performance should be about the same.

Actual behavior

This is the CPU usage breakdown:

Cascadia:

wt-cascadia

Hack:

wt-hack

A significant more amount of CPU is consumed with Cascadia.

The reason behind this is that for some reason, analyzer->GetTextComplexity() gives unexpected result for pure ASCII strings when using Cascadia.

For example, take a random string produced by cmatrix:

r   8   1   z $   J   p `   X \ M   o ;             E   o d A G 9   O                       T

With Cascadia GetTextComplexity reports this result:

  • Pos 0 - 17 : Simple
  • Pos 18 : Complex
  • Pos 18 - 97 : Simple

However with Hack, the entire text is reported as simple so that we can optimize the layout process.

I've seen a dozen of examples. The letter J seems to be the cause. I have no idea why the letter J is so special.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions