Changes between Version 1 and Version 16 of Ticket #2005


Ignore:
Timestamp:
Jun 28, 2013, 9:59:13 PM (11 years ago)
Author:
Jorma Rebane
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #2005

    • Property Status closednew
    • Property Summary CParser replacement + Hotkey code patch[PATCH] CParser removed + Hotkey patch
    • Property Priority Should HaveMust Have
    • Property Milestone BacklogAlpha 14
    • Property Keywords patch review memory added; parser strtok hotkey removed
    • Property Resolution fixed
  • Ticket #2005 – Description

    v1 v16  
    111) 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).
    22
    3 How SStrTok works:
     3How CTokenizer works:
    44   A string tokenizer doesn't own the string or memory you give it, so make sure the resource exists while you parse.
    55{{{
     
    77    std::string key, value;
    88
    9     SStrTok tokenizer(input);
    10     SStrTok token;
     9    CTokenizer tokenizer(input);
     10    CTokenizer token;
    1111
    1212    if(tokenizer.next(token, '=')) // split tokens at '='