Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quest DB/Log is a total memory waste. #133

Closed
shennetsind opened this issue Sep 7, 2013 · 0 comments
Closed

Quest DB/Log is a total memory waste. #133

shennetsind opened this issue Sep 7, 2013 · 0 comments
Assignees
Labels
component:core Affecting the Hercules core (i.e. not the game mechanics directly) type:enhancement Issue describes an enhancement or feature that should be implemented

Comments

@shennetsind
Copy link
Member

I'm currently going over my notebook and dumping things out of it as I see fit, this one is over a year old.
In every player instance (74.545 bytes):

    //Quest log system [Kevin] [Inkfish]
    int num_quests;//4
    int avail_quests;//4
    int quest_index[MAX_QUEST_DB];//4*MAX_QUEST_DB(2662) => 10648
    struct quest quest_log[MAX_QUEST_DB];//24*MAX_QUEST_DB(2662) -> 63888
    bool save_quest;//1
struct quest {//4+4+12+4 => 24
    int quest_id;//4
    unsigned int time;//4
    int count[MAX_QUEST_OBJECTIVES];//4*MAX_QUEST_OBJECTIVES(3) => 12
    quest_state state;//enum size -> 4 (compiler dependent ?)
};
#define MAX_QUEST_DB 2662       // Max quests that the server will load
#define MAX_QUEST_OBJECTIVES 3  // Max quest objectives for a quest

map_session_data stands with 236.888 bytes, the quest feature alone consumes 1/3 of it, regardless if the player has 1000 or 0 quests.

@ghost ghost assigned MishimaHaruna Nov 26, 2013
MishimaHaruna added a commit to MishimaHaruna/Hercules that referenced this issue Nov 27, 2013
- Improved memory usage of the quest log system. (saves up to 75kB per
  online character). Fixes issue HerculesWS#133.
- Fixed various issues with quest entries disappearing from characters
  without an apparent reason, or monster kill counters getting stuck.
- Added some code documentation.

Signed-off-by: Haru <haru@dotalux.com>
MishimaHaruna added a commit to MishimaHaruna/Hercules that referenced this issue Nov 27, 2013
- Improved memory usage of the quest log system. (saves up to 75kB per
  online character). Fixes issue HerculesWS#133.
- Fixed various issues with quest entries disappearing from characters
  without an apparent reason, or monster kill counters getting stuck.
- Added some code documentation.

Signed-off-by: Haru <haru@dotalux.com>
MishimaHaruna added a commit to MishimaHaruna/Hercules that referenced this issue Nov 27, 2013
- Improved memory usage of the quest log system. (saves up to 75kB per
  online character). Fixes issue HerculesWS#133.
- Fixed various issues with quest entries disappearing from characters
  without an apparent reason, or monster kill counters getting stuck -
  the issues were caused by a de-synchronization between the two
  parallel questlog arrays in map_session_data.
- Added some code documentation.
- Thanks to Ind.

Signed-off-by: Haru <haru@dotalux.com>
MishimaHaruna added a commit to MishimaHaruna/Hercules that referenced this issue Nov 27, 2013
- Improved memory usage of the quest log system. (saves up to 75kB per
  online character). Fixes issue HerculesWS#133.
- Fixed various issues with quest entries disappearing from characters
  without an apparent reason, or monster kill counters getting stuck -
  the issues were caused by a de-synchronization between the two
  parallel questlog arrays in map_session_data.
- Added some code documentation.
- Thanks to Ind.

Signed-off-by: Haru <haru@dotalux.com>
MishimaHaruna added a commit to MishimaHaruna/Hercules that referenced this issue Dec 1, 2013
- Improved memory usage of the quest log system. (saves up to 75kB per
  online character). Fixes issue HerculesWS#133.
- Fixed various issues with quest entries disappearing from characters
  without an apparent reason, or monster kill counters getting stuck -
  the issues were caused by a de-synchronization between the two
  parallel questlog arrays in map_session_data.
- Added some code documentation.
- Thanks to Ind.

Signed-off-by: Haru <haru@dotalux.com>
MishimaHaruna added a commit to MishimaHaruna/Hercules that referenced this issue Dec 3, 2013
- Improved memory usage of the quest log system. (saves up to 75kB per
  online character). Fixes issue HerculesWS#133.
- Fixed various issues with quest entries disappearing from characters
  without an apparent reason, or monster kill counters getting stuck -
  the issues were caused by a de-synchronization between the two
  parallel questlog arrays in map_session_data.
- Added some code documentation.
- Thanks to Ind.

Signed-off-by: Haru <haru@dotalux.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:core Affecting the Hercules core (i.e. not the game mechanics directly) type:enhancement Issue describes an enhancement or feature that should be implemented
Projects
None yet
Development

No branches or pull requests

2 participants