Well, I had to rewrite half of it, but I finally ported it into the Cool SL Viewer. Compared with Emerald's area search, the changes are as follow:
- Fixed the bugs (listing of "Requested_123456" fake objects when all search fields are empty, displaying of avatars among objects, non-functional "Reload" button).
- Made the floater much less laggy viewer side by throttling its update rate at 4 times a second at most instead of each time a new object data is received from the server (which may occur hundreds of times a second when search starts !).
- Cured the memory leaks issue: Emerald's never clears its object data cache (the Cool SL Viewer clears it on far TPs), and sends to the Selection Manager the data the area search requested, uselessly filling up the select manager cache with thousands of unneeded objects data which also slows down further touches on objects (the Cool SL Viewer's selection manager has been modified to detect and reject such useless, unrequested info).
- Take benefits from the selection manager requests to pre-fill the area search cache (thus avoiding to send duplicate requests for objects already dealt with by the selection manager).
- Prettified the floater, getting rid of unused columns (Pay and Buy, which had no code for filling them anyway).
- Added info in the floater about number of listed objects, number of pending requests to the server and total number of objects in cache.
- The buttons also now work as intended "Refresh" to force a refresh of the list, "Stop" to clear the search fields, close the floater and stop the search and fetching of more object data.
- Optimized (faster, smaller) code.
- Sources cleanup (abiding to LL's coding standards).
Note however, that the area search feature should be used sparingly as it sends hundreds of requests to the sim server each time a search is done for the first time in the sim (the next searches use the cached data). It's much like if you were clicking on each object within draw distance, and this in mere seconds only !
The search efficiency is affected by the draw distance, and not all requests for object info are honoured by the sim server (there must be some form of select distance limit on the server side for such requests, since it's primarily intended only for the selection manager...).
When you are done with a search, do make sure to use the "Stop" button to end it (and avoid to gather more data in the background while your avatar moves, sending useless requests to the server). Closing the floater via the "View" menu or with the close button on the upper right side of the floater simply sends the latter in the background and the search continues.