Skip to content

[Code] Cleanup Strings Header#4950

Merged
Akkadius merged 2 commits intomasterfrom
akkadius/cleanup-strings-header
Jun 22, 2025
Merged

[Code] Cleanup Strings Header#4950
Akkadius merged 2 commits intomasterfrom
akkadius/cleanup-strings-header

Conversation

@Akkadius
Copy link
Copy Markdown
Contributor

@Akkadius Akkadius commented Jun 22, 2025

Description

This is based off of efforts to cleanup the codebase, modernize and make it more efficient.

I have a branch called build-analyze that runs a trace of what takes up all of the build time (example here http://drone.akkadius.com/EQEmu/Server/18259/1/2)

We find that why strings.h is so expensive is because of all of the templates included in the header. Since it's included hundreds of times, everything is also having instantiate templates, pull in additional headers that may not be needed.

This PR cleans all of that up by removing templates and transitive includes.

Before

232055 ms: /drone/src/common/strings.h (included 214 times, avg 1084 ms), included via:
  80x: <direct include>
  16x: client.h linked_list.h extprofile.h inventory_profile.h item_instance.h evolving_items.h say_link.h saylink_repository.h 
  9x: bot.h bot_structs.h mob.h data_bucket.h data_buckets_repository.h 
  5x: shareddb.h say_link.h saylink_repository.h 
  5x: worlddb.h shareddb.h say_link.h saylink_repository.h 
  4x: zone.h 
  ...

After

Doesn't even show up on the report anymore

Type of change

  • Code Cleanup / Build Optimize

Testing

Automated CI tests

Checklist

  • I have tested my changes
  • I have performed a self-review of my code. Ensuring variables, functions and methods are named in a human-readable way, comments are added only where naming of variables, functions and methods can't give enough context.
  • I own the changes of my code and take responsibility for the potential issues that occur

@Akkadius Akkadius merged commit 5ac9dd0 into master Jun 22, 2025
2 checks passed
@Akkadius Akkadius deleted the akkadius/cleanup-strings-header branch June 22, 2025 18:52
@Akkadius Akkadius mentioned this pull request Jun 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants