mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
Merge pull request #6694 from atom/mb-optimize-get-decorations
🐎 Avoid repeated array allocation in ::getDecorations
This commit is contained in:
@@ -886,7 +886,7 @@ class DisplayBuffer extends Model
|
||||
getDecorations: (propertyFilter) ->
|
||||
allDecorations = []
|
||||
for markerId, decorations of @decorationsByMarkerId
|
||||
allDecorations = allDecorations.concat(decorations) if decorations?
|
||||
allDecorations.push(decorations...) if decorations?
|
||||
if propertyFilter?
|
||||
allDecorations = allDecorations.filter (decoration) ->
|
||||
for key, value of propertyFilter
|
||||
|
||||
Reference in New Issue
Block a user