Changes between Version 1 and Version 16 of Ticket #2005
- Timestamp:
- Jun 28, 2013, 9:59:13 PM (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #2005
- Property Status closed → new
- Property Summary CParser replacement + Hotkey code patch → [PATCH] CParser removed + Hotkey patch
- Property Priority Should Have → Must Have
- Property Milestone Backlog → Alpha 14
- Property Keywords patch review memory added; parser strtok hotkey removed
- Property Resolution fixed
-
Ticket #2005 – Description
v1 v16 1 1 1) CParser was a horrible freak of a regex parser. It left a horrible memory footprint and slowed the game down during load times. After replacing it with something much much simpler, the game startup and exit time was noticeably faster (alloc/dealloc overhead probably). 2 2 3 How SStrTokworks:3 How CTokenizer works: 4 4 A string tokenizer doesn't own the string or memory you give it, so make sure the resource exists while you parse. 5 5 {{{ … … 7 7 std::string key, value; 8 8 9 SStrToktokenizer(input);10 SStrToktoken;9 CTokenizer tokenizer(input); 10 CTokenizer token; 11 11 12 12 if(tokenizer.next(token, '=')) // split tokens at '='