Go Back   EQEmulator Home > EQEmulator Forums > General > General::General Discussion

General::General Discussion General discussion about EverQuest(tm), EQEMu, and related topics.
Do not post support topics here.

Reply
 
Thread Tools Display Modes
  #1  
Old 07-04-2016, 08:14 PM
fzzzty
Fire Beetle
 
Join Date: Aug 2010
Posts: 23
Default

Quote:
Originally Posted by Tyen05 View Post
The "where" wasnt killing my fps, but changed it to below and kept the spawnlist array a list instead of switching to a dictionary:
GameObject temp = ObjectPool.instance.spawnlist.FirstOrDefault(obj => obj.name == spawn_id.ToString());
Forgive me if you know this already, but FirstOrDefault will return null if it doesn't find anything, so you might have to handle that (probably the same path as if the Where returned no entries). Where passes through the whole list even if it finds something, of course, so this should be faster if you're guaranteed to have the thing in the lsit. Alternatively, First will throw if it finds nothing. ToLookup might be useful in some situations in case you haven't heard of it. No offense if you already know all this.
Reply With Quote
Reply

Tags
pras eqbrowser.com, unity3d


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 04:35 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3