[Perf] reduce memory usage by freeing playlist videos when playlist view is closed

This commit is contained in:
Brahim Hadriche committed 2025-10-02 09:05:12 -04:00
1 parent 0da51937f7
commit 5fcd576fc7
4 files changed
+7 -1

No files matched your search

+1
View File
@@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
- Bug: credentialTransferTokens should only be used with TV clients
- [Perf] reduce memory usage by freeing playlist videos when playlist view is closed
## [0.42.0] - 2025-09-30
@@ -6,6 +6,8 @@ namespace PlaylistUtils
end if
appController@.PushScreen(playlistView)
playlistView@.BindNode()
playlistView.content = contentNode
' Clone the playlist because the videos will be loaded as children.
' This allows the videos to be freed once the view is closed.
playlistView.content = contentNode.clone(false)
end function
end namespace
@@ -556,6 +556,8 @@ namespace Invidious
end if
json.type = "playlist"
' Since we only want the playlist info, we can remove the videos array
json.Delete("videos")
return {
items: [json]
}
+1
View File
@@ -241,6 +241,7 @@ export class InvidiousApi {
private async PlaylistInfoHandler(feedSource, responseJson) {
responseJson.type = "playlist";
delete responseJson.videos;
return { items: [responseJson] };
}