Last modified: 2011-06-25 11:36:40 UTC
The Third Turn (thethirdturn.com) has millions of properties. The autocomplete capabilities of Special:Ask tries to get all of them, blowing out the memory of my machine: Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 86 bytes) in /path/w/extensions/SemanticMediaWiki/includes/datavalues/SMW_DV_Property.php on line 97 While I know my site is an extreme example of SMW (I do need to go through and start streamlining my properties with Semantic Internal Objects), it would be nice to have some sort of sanity check that kills autocompletion after 5,000/whatever # properties.
Something like global $smwgQMaxLimit; $foo=smwfGetStore()->getStatistics(); if($foo['DECLPROPS']<$smwgQMaxLimit){ //body of the javascript autocomplete code } can be added at line 216 of SMW_SpecialAsk.php