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

SimDictionary improvement #1020

Merged
merged 7 commits into from Dec 23, 2014

Conversation

Projects
None yet
3 participants
@crabmusket
Contributor

crabmusket commented Dec 7, 2014

Includes #892 with tweaks. In comparison to that PR, I inverted the use of the #define so that it defaults to the old behaviour, and adding a define enables the new. This plays nicer with existing projects and the current CI setup (which needs to be fixed).

Winterleaf and others added some commits Nov 4, 2014

Improvements to SimDictionary for when you have a large number of obj…
…ects in the game. Under light load (i.e. under 5000 objects) this code actually runs slower that the stock simdictionary. When you exceed 5000 objects, the template class actually runs faster and more consistently.
Tweaks so I'm happy with it.
 * Change #define usage
 * Fix tabs

@crabmusket crabmusket added the Defect label Dec 7, 2014

@crabmusket crabmusket added this to the 3.7 milestone Dec 7, 2014

@LuisAntonRebollo

This comment has been minimized.

Show comment
Hide comment
@LuisAntonRebollo

LuisAntonRebollo Dec 9, 2014

Contributor

I like this, i'm 100% on std::unordered_map and c++11, but i'm not sure about something,

The code is a bit confusing about using const char* and StringTableEntry. All code seem to use StringTable but comparison function used on map compare c strings.

We can safe compare StringTableEntry by pointer, no?

Contributor

LuisAntonRebollo commented Dec 9, 2014

I like this, i'm 100% on std::unordered_map and c++11, but i'm not sure about something,

The code is a bit confusing about using const char* and StringTableEntry. All code seem to use StringTable but comparison function used on map compare c strings.

We can safe compare StringTableEntry by pointer, no?

@crabmusket

This comment has been minimized.

Show comment
Hide comment
@crabmusket

crabmusket Dec 9, 2014

Contributor

I'll make these changes tonight since I'm in control of the branch :P.

Contributor

crabmusket commented Dec 9, 2014

I'll make these changes tonight since I'm in control of the branch :P.

@crabmusket

This comment has been minimized.

Show comment
Hide comment
@crabmusket

crabmusket Dec 10, 2014

Contributor

@Winterleaf, do you feel like pulling this branch into your code to make sure nothing breaks? I removed a lot of redundant calls to StringTable->insert, though since C++ isn't type-safe you never know what might happen. Outpost and the editors seem fine here.

Contributor

crabmusket commented Dec 10, 2014

@Winterleaf, do you feel like pulling this branch into your code to make sure nothing breaks? I removed a lot of redundant calls to StringTable->insert, though since C++ isn't type-safe you never know what might happen. Outpost and the editors seem fine here.

@Winterleaf

This comment has been minimized.

Show comment
Hide comment
@Winterleaf

Winterleaf Dec 10, 2014

Contributor

How do I pull it back?

Contributor

Winterleaf commented Dec 10, 2014

How do I pull it back?

@crabmusket

This comment has been minimized.

Show comment
Hide comment
@crabmusket

crabmusket Dec 10, 2014

Contributor
git remote add eightyeight git://github.com/eightyeight/Torque3D.git
git fetch eightyeight
git merge eightyeight/simdictionary-improvement
Contributor

crabmusket commented Dec 10, 2014

git remote add eightyeight git://github.com/eightyeight/Torque3D.git
git fetch eightyeight
git merge eightyeight/simdictionary-improvement
@@ -129,7 +144,7 @@ void SimNameDictionary::remove(SimObject* obj)
return;

This comment has been minimized.

@LuisAntonRebollo

LuisAntonRebollo Dec 22, 2014

Contributor

if(!obj->objectName)Better if we check obj ptr before use..

@LuisAntonRebollo

LuisAntonRebollo Dec 22, 2014

Contributor

if(!obj->objectName)Better if we check obj ptr before use..

@LuisAntonRebollo

This comment has been minimized.

Show comment
Hide comment
@LuisAntonRebollo

LuisAntonRebollo Dec 23, 2014

Contributor

I think all are OK for merge 👍

Contributor

LuisAntonRebollo commented Dec 23, 2014

I think all are OK for merge 👍

crabmusket added a commit that referenced this pull request Dec 23, 2014

@crabmusket crabmusket merged commit c85ac03 into GarageGames:development Dec 23, 2014

@crabmusket crabmusket deleted the crabmusket:simdictionary-improvement branch Dec 23, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment