stylo: Add gtest microbenchmark for Servo_DeclarationBlock_GetPropertyValueById

RESOLVED FIXED in Firefox 57

Status

()

Core
CSS Parsing and Computation
P5
normal
RESOLVED FIXED
9 months ago
9 months ago

People

(Reporter: SimonSapin, Unassigned)

Tracking

unspecified
mozilla57
Points:
---

Firefox Tracking Flags

(firefox57 fixed)

Details

MozReview Requests

()

Submitter Diff Changes Open Issues Last Updated
Loading...
Error loading review requests:

Attachments

(1 attachment)

Comment hidden (empty)
Comment hidden (mozreview-request)

Comment 2

9 months ago
mozreview-review
Comment on attachment 8902244 [details]
Bug 1394792 - Add gtest microbenchmark for Servo_DeclarationBlock_GetPropertyValueById.

https://reviewboard.mozilla.org/r/173774/#review179046

::: layout/style/test/gtest/StyloParsingBench.cpp:115
(Diff revision 1)
> +    nullptr
> +  );
> +
> +  for (int i = 0; i < GETPROPERTY_REPETITIONS; i++) {
> +    DOMString value_;
> +    nsAString& value = value_;

I guess this is done to make it more similar to the DOM profile, right?

Otherwise we can use `nsAutoString` or something like that.

::: layout/style/test/gtest/StyloParsingBench.cpp:120
(Diff revision 1)
> +    nsAString& value = value_;
> +    Servo_DeclarationBlock_GetPropertyValueById(
> +      block,
> +      eCSSProperty_width,
> +      &value
> +    );

`MOZ_ASSERT(value.EqualsLiteral("10px"))`? (not sure if worth)
Attachment #8902244 - Flags: review?(emilio) → review+
(Reporter)

Comment 3

9 months ago
mozreview-review-reply
Comment on attachment 8902244 [details]
Bug 1394792 - Add gtest microbenchmark for Servo_DeclarationBlock_GetPropertyValueById.

https://reviewboard.mozilla.org/r/173774/#review179046

> I guess this is done to make it more similar to the DOM profile, right?
> 
> Otherwise we can use `nsAutoString` or something like that.

It’s rather the first thing I found when looking up callers to get something to compile at all, but yeah that too.
Comment hidden (mozreview-request)

Comment 5

9 months ago
Pushed by simon.sapin@exyr.org:
https://hg.mozilla.org/integration/autoland/rev/f0039e9a1276
Add gtest microbenchmark for Servo_DeclarationBlock_GetPropertyValueById. r=emilio
Priority: -- → P5

Comment 6

9 months ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/f0039e9a1276
Status: NEW → RESOLVED
Last Resolved: 9 months ago
status-firefox57: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
You need to log in before you can comment on or make changes to this bug.