perf: use style.setProperty instead of setAttribute in render3 and iv benchmarks (#20855)

PR Close #20855
This commit is contained in:
Marc Laval 2017-12-13 17:10:53 +01:00 committed by Igor Minar
parent 19eeba2281
commit 09e3839994
4 changed files with 7 additions and 7 deletions

File diff suppressed because one or more lines are too long

View File

@ -6,7 +6,7 @@
* found in the LICENSE file at https://angular.io/license
*/
import {C, E, T, V, a, b, b1, c, defineComponent, detectChanges, e, rC, rc, t, v} from '@angular/core/src/render3/index';
import {C, E, T, V, s, b, c, defineComponent, detectChanges, e, rC, rc, t, v} from '@angular/core/src/render3/index';
import {ComponentDef} from '@angular/core/src/render3/public_interfaces';
import {TableCell, buildTable, emptyTable} from '../util';
@ -52,7 +52,7 @@ export class LargeTableComponent {
{ T(1); }
e();
}
a(0, 'style', b1('background-color:', cell.row % 2 ? '' : 'grey', ''));
s(0, 'background-color', b(cell.row % 2 ? '' : 'grey'));
t(1, b(cell.value));
}
v();

File diff suppressed because one or more lines are too long

View File

@ -6,7 +6,7 @@
* found in the LICENSE file at https://angular.io/license
*/
import {C, D, E, T, V, a, b, b1, c, defineComponent, detectChanges as _detectChanges, e, p, rC, rc, t, v} from '@angular/core/src/render3/index';
import {C, D, E, T, V, s, b, b1, c, defineComponent, detectChanges as _detectChanges, e, p, rC, rc, t, v} from '@angular/core/src/render3/index';
import {ComponentDef} from '@angular/core/src/render3/public_interfaces';
import {TreeNode, buildTree, emptyTree} from '../util';
@ -48,7 +48,7 @@ export class TreeComponent {
C(3);
c();
}
a(0, 'style', b1('background-color:', ctx.data.depth % 2 ? '' : 'grey', ''));
s(0, 'background-color', b(ctx.data.depth % 2 ? '' : 'grey'));
t(1, b1(' ', ctx.data.value, ' '));
rC(2);
{
@ -116,7 +116,7 @@ export function TreeTpl(ctx: TreeNode, cm: boolean) {
C(3);
c();
}
a(0, 'style', b1('background-color:', ctx.depth % 2 ? '' : 'grey', ''));
s(0, 'background-color', b(ctx.depth % 2 ? '' : 'grey'));
t(1, b1(' ', ctx.value, ' '));
rC(2);
{