Skip to content

Improve the precision of getFittedText#4893

Merged
fqueze merged 1 commit into
firefox-devtools:mainfrom
fqueze:improve-getFittedText
Jan 31, 2024
Merged

Improve the precision of getFittedText#4893
fqueze merged 1 commit into
firefox-devtools:mainfrom
fqueze:improve-getFittedText

Conversation

@fqueze

@fqueze fqueze commented Jan 19, 2024

Copy link
Copy Markdown
Contributor

The "Show marker count next to the marker name in the marker chart when a marker is hovered." commit was already in a separate PR (#4892), but the 2 patches would conflict.

┆Issue is synchronized with this Jira Task

@fqueze fqueze requested a review from mstange January 19, 2024 18:03
@codecov

codecov Bot commented Jan 19, 2024

Copy link
Copy Markdown

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (e29cbe2) 88.43% compared to head (b8c4894) 88.42%.

❗ Current head b8c4894 differs from pull request most recent head 67b07ef. Consider uploading reports for the commit 67b07ef to get more accurate results

Files Patch % Lines
src/utils/text-measurement.js 85.71% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4893      +/-   ##
==========================================
- Coverage   88.43%   88.42%   -0.02%     
==========================================
  Files         304      303       -1     
  Lines       27211    27153      -58     
  Branches     7338     7335       -3     
==========================================
- Hits        24065    24009      -56     
+ Misses       2928     2926       -2     
  Partials      218      218              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mstange mstange left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I was concerned that this might negatively affect the performance of drawing the flame graph or the stack chart, so I did some testing in the deploy preview on this profile and couldn't find measureText in the profile anywhere. So everything seems to be fine.

Comment thread src/utils/text-measurement.js Outdated
Comment thread src/utils/text-measurement.js Outdated
@fqueze

fqueze commented Jan 25, 2024

Copy link
Copy Markdown
Contributor Author

I was concerned that this might negatively affect the performance of drawing the flame graph or the stack chart, so I did some testing in the deploy preview on this profile and couldn't find measureText in the profile anywhere. So everything seems to be fine.

In my testing, .measureText seems to be about 1.5% of the non-idle samples when I scroll around a lot in the flame graph, stack chart or marker chart for the profile you shared. That's less than the fillStyle setter, so probably not something we need to worry about.

@fqueze fqueze force-pushed the improve-getFittedText branch from dd86b38 to b8c4894 Compare January 25, 2024 09:29
@fqueze fqueze force-pushed the improve-getFittedText branch from b8c4894 to 67b07ef Compare January 31, 2024 13:06
@fqueze fqueze enabled auto-merge (squash) January 31, 2024 13:07
@fqueze fqueze merged commit e399e83 into firefox-devtools:main Jan 31, 2024
@julienw julienw mentioned this pull request Feb 6, 2024
julienw added a commit that referenced this pull request Feb 6, 2024
[@canova Nazım Can Altınova] Return null instead of throwing an error if it fails to get the resource name in active tab view (#4905)
[@fqueze Florian Quèze] Improve the precision of the getFittedText implementation. (#4893)
[@fqueze Florian Quèze] Show marker count next to the marker name in the marker chart when a marker is hovered. (#4892)
[@mstange Markus Stange] Convert some code to use the non-inverted call node table even while we're showing the inverted call tree (Merge PR #4899)
[@canova Nazım Can Altınova] Bring the max stacking depth limit back for marker timings (#4898)
[@mstange Markus Stange] Various preparations in call tree code for fast inverted tree (Merge PR #4897)
[@mstange Markus Stange] Move call node path/index conversion functions into CallNodeInfo (Merge PR #4896)
[@mstange Markus Stange] Make mergeFunction fast (Merge PR #4895)
[@gthb Gunnlaugur Thor Briem] feat: support from-url profiles in compare (#4875)

And all the locale contributors:
de: Michael Köhler
el: Jim Spentzos
en-GB: Ian Neal
es-CL: ravmn
fr: Théo Chevalier
fy-NL: Fjoerfoks
ia: Melo46
it: Francesco Lodolo [:flod]
nl: Fjoerfoks, Mark Heijl
pt-BR: Marcelo Ghelman
ru: Valery Ledovskoy
sv-SE: Andreas Pettersson
uk: Artem Polivanchuk
zh-CN: 你我皆凡人, Olvcpr423, Pontoon
zh-TW: Pin-guang Chen
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.

2 participants