You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tachiyomi clients currently need to be careful about performing certain bulk actions because an excessive number of network requests could put significant load on sources and cause users to get throttled or blacklisted. Even for sources that don't punish users who make a large number of requests, it is still in the philosophy of Tachiyomi/Mihon to avoid causing excess strain. This is evidenced by the push notifications Mihon presents when a user attempts to update a large number of manga at one time, as well as by various restrictions and optimizations that have been put in place to avoid large numbers of requests going through at one time.
Some sources do have functionality that allows fetching details on a large number of manga at once. However, because extensions-lib doesn't provide any way to tell clients that, extensions for sources that could hypothetically provide these enhanced capabilities still need to go at the same slow pace as every other source, making one request per manga. While there is an UnmeteredSource interface, it has no methods so it doesn't actually enable more efficient updates, it's just used for sources that don't care about a large number of requests (such as the local source).
Feature request
Mihon should introduce either a new interface or new methods on an existing interface (or some other design) that extensions can implement to take control of mass updates on supporting clients.
For example, a possible API (with default implementations) could look like:
interfaceMangaUpdate {
/** * If true and newDetails is null, this will inform the client to fetch manga details individually*/var hasDetailsChanged:Boolean/** * If true and newChapterList is null, this will inform the client to fetch chapter lists individually*/var hasChapterListChanged:Booleanvar newDetails:SManga?var newChapterList:List<SChapter>?companionobject {
funcreate(): MangaUpdate=throwNotImplementedError()
}
}
interfaceSource {
// existing methods.../** * Get information about required updates for a group of manga * * @param manga the list of manga to update. * @return update information for each manga. * The returned list must be the same length and in the same order as the original list.*/suspendfungetMultipleMangaUpdates(manga:List<SManga>): List<MangaUpdate>
= manga.map { MangaUpdate.create().apply {
hasDetailsChanged =true
hasChapterListChanged =true
} }
/** * Get groups of manga to update together when updating multiple manga. * * @param manga the list of manga to partition. * @return a list of partitions of manga. Every input manga should be included in exactly one partition.*/funpartitionMangaForUpdate(manga:List<SManga>): List<List<SManga>>
= manga.map { listOf(it) }
}
An additional set of functions/properties for performance tuning and for opting into more frequent updates could also be useful, but I think the above would already provide significant benefit on its own.
Other details
No response
Acknowledgements
I have searched the existing issues and this is a new ticket, NOT a duplicate or related to another open or closed issue.
Describe your suggested feature
Background
Tachiyomi clients currently need to be careful about performing certain bulk actions because an excessive number of network requests could put significant load on sources and cause users to get throttled or blacklisted. Even for sources that don't punish users who make a large number of requests, it is still in the philosophy of Tachiyomi/Mihon to avoid causing excess strain. This is evidenced by the push notifications Mihon presents when a user attempts to update a large number of manga at one time, as well as by various restrictions and optimizations that have been put in place to avoid large numbers of requests going through at one time.
Some sources do have functionality that allows fetching details on a large number of manga at once. However, because
extensions-lib
doesn't provide any way to tell clients that, extensions for sources that could hypothetically provide these enhanced capabilities still need to go at the same slow pace as every other source, making one request per manga. While there is anUnmeteredSource
interface, it has no methods so it doesn't actually enable more efficient updates, it's just used for sources that don't care about a large number of requests (such as the local source).Feature request
Mihon should introduce either a new interface or new methods on an existing interface (or some other design) that extensions can implement to take control of mass updates on supporting clients.
For example, a possible API (with default implementations) could look like:
An additional set of functions/properties for performance tuning and for opting into more frequent updates could also be useful, but I think the above would already provide significant benefit on its own.
Other details
No response
Acknowledgements
The text was updated successfully, but these errors were encountered: