Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 22, 2009, 9:46:53 AM (16 years ago)
Author:
scheusso
Message:

trying to make some performance improvements in TrafficControl

Location:
code/branches/netp3/src/network/packet
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/netp3/src/network/packet/Gamestate.cc

    r3003 r3015  
    111111    tempsize = it->getData(mem, id, mode);
    112112    if ( it->doSync( id, mode ) )
    113       dataMap_.push_back( obj(it->getObjectID(), it->getCreatorID(), tempsize, mem-data_) );
     113      dataVector_.push_back( obj(it->getObjectID(), it->getCreatorID(), tempsize, mem-data_) );
    114114   
    115115#ifndef NDEBUG
     
    364364Gamestate* Gamestate::doSelection(unsigned int clientID, unsigned int targetSize){
    365365  assert(data_);
    366   std::list<obj>::iterator it;
     366  std::vector<obj>::iterator it;
    367367
    368368  // allocate memory for new data
     
    383383
    384384  //call TrafficControl
    385   TrafficControl::getInstance()->processObjectList( clientID, header_->getID(), &dataMap_ );
     385  TrafficControl::getInstance()->processObjectList( clientID, header_->getID(), dataVector_ );
    386386
    387387  //copy in the zeros
    388   for(it=dataMap_.begin(); it!=dataMap_.end();){
     388  for(it=dataVector_.begin(); it!=dataVector_.end();){
    389389    SynchronisableHeader oldobjectheader(origdata);
    390390    SynchronisableHeader newobjectheader(newdata);
  • code/branches/netp3/src/network/packet/Gamestate.h

    r2896 r3015  
    3737#include <string.h>
    3838#include <map>
    39 #include <list>
     39#include <vector>
    4040#include <cassert>
    4141#ifndef NDEBUG
     
    129129  private:
    130130    uint32_t calcGamestateSize(int32_t id, uint8_t mode=0x0);
    131     std::list<obj> dataMap_;
     131    std::vector<obj> dataVector_;
    132132    GamestateHeader* header_;
    133133};
Note: See TracChangeset for help on using the changeset viewer.