Project

General

Profile

Bug #16524

we should not use .size to check if a collection is empty

Added by Nicolas CHARLES 6 months ago. Updated 5 months ago.

Status:
Released
Priority:
N/A
Category:
Performance and scalability
Target version:
Severity:
User visibility:
Effort required:
Priority:
0

Description

see https://pavelfatin.com/scala-collections-tips-and-tricks/

.size for to iterate over the whole collection/list, so we should use isEmpty or seq.lengthCompare(n)


Subtasks

Bug #16606: same as parent ticket, but for .lengthReleasedFrançois ARMANDActions

Related issues

Related to Rudder - Bug #16537: Node never updated because of nonEmpty in place of isEmptyReleasedNicolas CHARLESActions

Also available in: Atom PDF