View Single Post
  #13  
Old 08-06-2007, 08:06 AM
sfisque
Hill Giant
 
Join Date: Oct 2006
Posts: 248
Default

one request i'd like to make:

streamline the faction entries. currently the faction data is set up as one faction entry per npc_type entity, which is highly inefficient. there doesnt need to be one entry for EVERY freeport guard, froglok, cyclops, etc. we could probably get by with one entry for "all generic freeport guards", "all unamed wurms in skyfire", etc. that way the table gets alot smaller.

for example:

select * from npc_faction where primaryfaction = 105; -- freeport militia

yields a bunch of entries. since most of these guards are not special quest npcs, wouldnt it be more efficient to use a single npc_faction entry and have point to it. the same should be done for all the npc_faction entries. the npc_faction_entries table would have to be updated accordingly to point to the streamlined entries.

i know some of this stuff is cached in memory because i found that they are stored in an array keyed by id, and just arbitrarily removing entries (creating holes) causes the server to hiccough and fail to launch. thus it would require some work and not just arbitrarily removing the redundancies and updating the backpointers (foreign keys).

thus, reducing the clutter "should" make the server leaner memory-wise and run a tad more optimally.

i've started working on this in my personal DB, and i plan on sharing it once i get it all cleaned up and finished. if anyone is interested.

== sfisque
Reply With Quote