idanwin Posted February 3, 2014 Report Share Posted February 3, 2014 I was making a new map and I keep getting this error:"spatial subdivision query too large"what does this mean? Quote Link to comment Share on other sites More sharing options...
sanderd17 Posted February 3, 2014 Report Share Posted February 3, 2014 I guess you mean this: "SpatialSubdivision Query too large. Results truncated."? If you don't provide any logs, please try to keep the capitalisation and spacing of the original message. It makes it so much easier for us to search.This is something RedFox introduced some time ago. The old spacial subdivision used variable-length vectors (so there was only a hardware limit on the number of entities per tile you can place), while after that change, there's a limit of 1024 units per subdivision (I don't know exactly how large a subdivision is). Later on, it was doubled to 2048.It probably means you have placed your trees or other entities too dense for RedFox' limits.I also remeber there was a quite heated discussion on the fixed limits those days. Quote Link to comment Share on other sites More sharing options...
FeXoR Posted February 3, 2014 Report Share Posted February 3, 2014 Was it done to improve performance? If so, did it in fact perform notably better? Quote Link to comment Share on other sites More sharing options...
sanderd17 Posted February 3, 2014 Report Share Posted February 3, 2014 Was it done to improve performance?Yes, it was done to improve memory allocation IIRC. With growing lists, you need to allocate an increasing amount of memory, and each time you allocate memory, it costs some time. If so, did it in fact perform notably better?Hard to tell. Once enough memory is allocated (after a maximum number of units passed on those tiles), it won't improve performance. And on the other hand, with the limit in place, it will always allocate the same amount of memory. So in the most cases, you'll have wasted a multiple of the needed memory. It's quite hard to find decent profiling of it too, because of all the discussion around it. Quote Link to comment Share on other sites More sharing options...
Leroy30 Posted February 3, 2014 Report Share Posted February 3, 2014 Any way to work around this problem without reducing the number of entities? I also have this problem on my map.. Quote Link to comment Share on other sites More sharing options...
FeXoR Posted February 3, 2014 Report Share Posted February 3, 2014 (edited) Does units walking into the subdivision count as well (so the error may not always occur but only if units are tightly packed there by a player)?(This would be horrifying since the map will load but if a player commands his army through a subdivisions already containing entities close to the limit the error will be risen)On the other hand I don't think map designers shouldn't pack non-moving entities tighter than 1 per terrain tile (though actors might be).(However, the engine should not break because of this.)Performance is a valid reason to limit flexibility though sad IMO.(I think this should have been considered in the very basic design of the engine IMO but I think it's to late for that (?))I don't like unneeded hard limits in general though (I like flexibility) but I have not enough information to really get involved into this. Edited February 3, 2014 by FeXoR Quote Link to comment Share on other sites More sharing options...
wraitii Posted February 3, 2014 Report Share Posted February 3, 2014 Yeah units would count.I'm not really sure there's a real performance downgrade memory-wise if we do this conservatively. Vectors are guaranteed to be continuous, and we could use a sensible limit on init (counting the number of entity in that subdivision) that would probably be enough once and for all, yet retain adaptativeness.Though we probably could use a cleverer data structure anyhow if we could figure one out. Quote Link to comment Share on other sites More sharing options...
idanwin Posted February 3, 2014 Author Report Share Posted February 3, 2014 (edited) When was this introduced? I only get the error with the svn, not with Alpha 15. (I had a look at the link you gave, but couldn't find any timestamp.EDIT: I updated to the latest svn today (something I hadn't done in about a week) and I don't get the error there anymore either ... Edited February 3, 2014 by idanwin Quote Link to comment Share on other sites More sharing options...
alpha123 Posted February 4, 2014 Report Share Posted February 4, 2014 Was it done to improve performance? If so, did it in fact perform notably better?Allegedly, yes, but it is difficult to get accurate performance measurements. I think it’s reasonably safe to say it results in a small performance boost; however, that may not even be noticeable. I frankly was opposed to this change (and still am), but IIRC it was done to pave the way for some other changes that would have a larger effect. Since those never really got done I’m in favor of reverting it. That’s quite weird that you’re no longer getting it idanwin; I can’t think of a change in the last week that would have fixed that (plus it should also be happening in A15). Quote Link to comment Share on other sites More sharing options...
idanwin Posted February 4, 2014 Author Report Share Posted February 4, 2014 I do remember having another issue with which it might have something to do:A few days ago buildings seemed to multiply. I destroyed a building and it sank into the ground, but the building was still standing. So I opened debug mode and clicked 'control all units' and deleted that tower over and over, but it seemed like infinitely many towers had been placed on the same spot. The same happened with civ centres. This only happened in the svn build. I thought it was probably because of a change that had not been completed and that the issue would be resolved soon after. I updated about 3 times that day, but the issue wasn't fixed.It has been fixed now. This might have been the issue... I only got the error in the map editor after running a simulation test. Quote Link to comment Share on other sites More sharing options...
historic_bruno Posted February 8, 2014 Report Share Posted February 8, 2014 Was it done to improve performance? If so, did it in fact perform notably better?No. If you looked closely in a profiler, you would notice a difference when range queries are at their worst (but we need like a 10x improvement there to matter, which you won't get by hardcoding all kinds of limits in the data structure). I would actually love to kick that change to the curb, it's been in the back of my mind for a while now. 1 Quote Link to comment Share on other sites More sharing options...
wraitii Posted February 8, 2014 Report Share Posted February 8, 2014 I'm all for reverting that particular change.I've got an idea for a change in the structure of that, some sort of custom tree. 2 Quote Link to comment Share on other sites More sharing options...
historic_bruno Posted February 8, 2014 Report Share Posted February 8, 2014 Go for it And if you're interested, check out the discussion(s) Philip and Redfox had on IRC last year. Philip's idea was kinda weird and maybe no one else understands it enough to implement it, but it may be worth a try. Quote Link to comment Share on other sites More sharing options...
wraitii Posted February 8, 2014 Report Share Posted February 8, 2014 Would you happen to have a date/date range in mind for that?I've described my current idea here, for the record. Quote Link to comment Share on other sites More sharing options...
Josh Posted February 16, 2014 Report Share Posted February 16, 2014 Is the error constantly repeating? In the last month or so I changed the selection system to use SpatialSubdivison and I think there were some issues at one point where the query would be larger then the map size when using the dev overlay which got the SpatialSubdivison angry. Quote Link to comment Share on other sites More sharing options...
sanderd17 Posted February 16, 2014 Report Share Posted February 16, 2014 Is the error constantly repeating? In the last month or so I changed the selection system to use SpatialSubdivison and I think there were some issues at one point where the query would be larger then the map size when using the dev overlay which got the SpatialSubdivison angry.I believe Idanwin is using A15, so that wouldn't matter. Though maybe you've found a new problem indeed. Quote Link to comment Share on other sites More sharing options...
idanwin Posted March 3, 2014 Author Report Share Posted March 3, 2014 (edited) I always use SVN. That's why the error miraculously disappeared.EDIT: read my post again. Why did you think I used A15? I explicitly stated svn before ... Edited March 3, 2014 by idanwin Quote Link to comment Share on other sites More sharing options...
historic_bruno Posted March 9, 2014 Report Share Posted March 9, 2014 Would you happen to have a date/date range in mind for that? I've described my current idea here, for the record.Sorry for the late response. One good discussion was in IRC on 2013-09-22, Philip gives a summary around 19:49. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.