Remove iterators from IDecorationService
They're too low performance for typical use cases Fixes #4079
This commit is contained in:
@@ -204,9 +204,9 @@ export class DomRendererRowFactory {
|
||||
let bgOverride: IColor | undefined;
|
||||
let fgOverride: IColor | undefined;
|
||||
let isTop = false;
|
||||
for (const d of this._decorationService.getDecorationsAtCell(x, row)) {
|
||||
this._decorationService.forEachDecorationAtCell(x, row, undefined, d => {
|
||||
if (d.options.layer !== 'top' && isTop) {
|
||||
continue;
|
||||
return;
|
||||
}
|
||||
if (d.backgroundColorRGB) {
|
||||
bgColorMode = Attributes.CM_RGB;
|
||||
@@ -219,7 +219,7 @@ export class DomRendererRowFactory {
|
||||
fgOverride = d.foregroundColorRGB;
|
||||
}
|
||||
isTop = d.options.layer === 'top';
|
||||
}
|
||||
});
|
||||
|
||||
// Apply selection foreground if applicable
|
||||
const isInSelection = this._isCellInSelection(x, row);
|
||||
|
||||
Reference in New Issue
Block a user