From ff4dd67c6cf96e6b7eb2bb9710ebddc125b81c1e Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Thu, 10 Oct 2013 19:43:33 +0200 Subject: [PATCH] add FIXME for totally slow unacceptable code --- qcsrc/menu/xonotic/serverlist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qcsrc/menu/xonotic/serverlist.c b/qcsrc/menu/xonotic/serverlist.c index e0260e8d3..24694d5f4 100644 --- a/qcsrc/menu/xonotic/serverlist.c +++ b/qcsrc/menu/xonotic/serverlist.c @@ -624,7 +624,7 @@ void XonoticServerList_draw(entity me) // entire list, otherwise there is no way to know which item is first in its category. float cat, x; - for(i = 0; i < itemcount; ++i) + for(i = 0; i < itemcount; ++i) // FIXME this loop is TOTALLY unacceptable (O(servers)). Make it O(categories * log(servers)). Yes, that is possible. { cat = gethostcachenumber(SLIST_FIELD_CATEGORY, i); if(cat) -- 2.39.2