Describe the bug
i'm using var track = await yt.videos.closedCaptions.get(trackInfo); to get the captions and need to do map on track.captions
but the UnmodifiableListView is very slow on operator [](int index).
It takes about 8 seconds to finish the for in operation, in my case, over 1600 captions.
Below is my test code.
final tempList = track.captions;
final listLength = track.captions.length;
print(DateTime.now());
while (index < listLength) {
var caption = tempList[index];
index++;
}
print(DateTime.now());
Want to know why we are using UnmodifiableListView?
Describe the bug i'm using
var track = await yt.videos.closedCaptions.get(trackInfo);
to get the captions and need to do map ontrack.captions
but the UnmodifiableListView is very slow onoperator [](int index)
. It takes about 8 seconds to finish thefor in
operation, in my case, over 1600 captions.Below is my test code.
Want to know why we are using UnmodifiableListView?