mtasa-blue icon indicating copy to clipboard operation
mtasa-blue copied to clipboard

Optimize CCustomData

Open Pirulax opened this issue 3 years ago • 0 comments

Changelog:

  • Removed redundant m_SyncedData
  • Changed map type to CFastHashMap as we want the absolute maximum performance
  • Removed IterBegin and IterSyncedBegin. Replaced it with GetAll() for based range loop
  • Changed const char* for the name (in function argument list) to const std::string& because when searching in the hash map we'll need to use std::string anyways (Thats how it works sadly)
  • I'll open a separate PR for more changes, because this can be optimized even further

Note:

  • This is only the server side. I'll open a separate PR - because I dont want to spam this one with changes, would make it hard to review - which will move all this to Shared

Pirulax avatar Nov 10 '20 21:11 Pirulax