Closed Famlam closed 1 year ago
Possible solution idea: limit the number of "classes x countries"
This is a good idea, and we already do this to limit the number of errors shown on this page.
@frodrigo , would this patch work?
--- a/web_api/issues.py
+++ b/web_api/issues.py
@@ -64,7 +64,7 @@ async def index(
errors_groups: List[Dict[str, Any]] = []
total = 0
if params.item:
- params.limit = None
+ params.limit = min(params.limit, 1000)
errors_groups = await query._count(
db,
params,
No, params.limit is already used for the issues list.
Fixed browser side.
Great 😊
Possible solution idea: limit the number of "classes x countries" loaded by default to for example 5000, similar to the issue list (which by default only loads 50 issues unless you explicitly click a button to load more)? If the server does the pre-sorting to get the ones with the most issues, you'll still see the most useful ones.
OpenRailwayMap has 42 classes; Osmose has about 1200 countries/regions, so the total number of rows to be loaded would be over 50k
Another option would be to disable this specific plugin in the backend in countries without a railway network , but this would only exclude about 45 countries https://en.wikipedia.org/wiki/List_of_countries_by_rail_transport_network_size#Countries_currently_without_a_rail_network