[Perf] reduce memory usage by freeing playlist videos when playlist view is closed
This commit is contained in:
1 parent
0da51937f7
commit
5fcd576fc7
4 files changed
+7
-1
No files matched your search
@@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
- Bug: credentialTransferTokens should only be used with TV clients
|
- 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
|
## [0.42.0] - 2025-09-30
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,8 @@ namespace PlaylistUtils
|
|||||||
end if
|
end if
|
||||||
appController@.PushScreen(playlistView)
|
appController@.PushScreen(playlistView)
|
||||||
playlistView@.BindNode()
|
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 function
|
||||||
end namespace
|
end namespace
|
||||||
@@ -556,6 +556,8 @@ namespace Invidious
|
|||||||
end if
|
end if
|
||||||
|
|
||||||
json.type = "playlist"
|
json.type = "playlist"
|
||||||
|
' Since we only want the playlist info, we can remove the videos array
|
||||||
|
json.Delete("videos")
|
||||||
return {
|
return {
|
||||||
items: [json]
|
items: [json]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -241,6 +241,7 @@ export class InvidiousApi {
|
|||||||
|
|
||||||
private async PlaylistInfoHandler(feedSource, responseJson) {
|
private async PlaylistInfoHandler(feedSource, responseJson) {
|
||||||
responseJson.type = "playlist";
|
responseJson.type = "playlist";
|
||||||
|
delete responseJson.videos;
|
||||||
return { items: [responseJson] };
|
return { items: [responseJson] };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user