[Perf] reduce some rendezvous
This commit is contained in:
1 parent
96f24a12a7
commit
c14fa7a1d3
1 file changed
+17
-6
@@ -154,15 +154,26 @@ function VideoRowListRowContentTask(input as object) as object
|
|||||||
end function
|
end function
|
||||||
|
|
||||||
function RemovePlaceHolderItems(contentNode as object)
|
function RemovePlaceHolderItems(contentNode as object)
|
||||||
|
childCount = contentNode.getChildCount()
|
||||||
|
removeIndex = childCount
|
||||||
|
removeCount = 0
|
||||||
|
|
||||||
|
index = childCount - 1
|
||||||
isLoading = true
|
isLoading = true
|
||||||
while isLoading and contentNode.getChildCount() > 0
|
while isLoading and index >= 0
|
||||||
lastIndex = contentNode.getChildCount() - 1
|
child = contentNode.getChild(index)
|
||||||
child = contentNode.getChild(lastIndex)
|
isLoading = ValidString(child.type) = "loading"
|
||||||
isLoading = IsString(child.type) and child.type = "loading"
|
if not isLoading
|
||||||
if isLoading = true
|
exit while
|
||||||
contentNode.removeChildIndex(lastIndex)
|
|
||||||
end if
|
end if
|
||||||
|
removeCount += 1
|
||||||
|
removeIndex -= 1
|
||||||
|
index -= 1
|
||||||
end while
|
end while
|
||||||
|
|
||||||
|
if removeCount > 0
|
||||||
|
contentNode.removeChildrenIndex(removeCount, removeIndex)
|
||||||
|
end if
|
||||||
end function
|
end function
|
||||||
|
|
||||||
function HandleFeedLoadErrorDialog(error as object, rowList as object) as void
|
function HandleFeedLoadErrorDialog(error as object, rowList as object) as void
|
||||||
|
|||||||
Reference in new issue
Block a user