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

Move the db to a proper database system #72

Open
Giallustio opened this issue Dec 28, 2015 · 3 comments
Open

Move the db to a proper database system #72

Giallustio opened this issue Dec 28, 2015 · 3 comments

Comments

@Giallustio
Copy link
Owner

iniDB maybe?

@Vdauphin
Copy link
Contributor

I don't know how it works, never used, I will documented me.
But if it is better why not ! 👍

@Giallustio
Copy link
Owner Author

I took a quick look at it.
Why you didn't create a section per city instead of a big array?

It was a very superficial look, so it could be a dump question.

@Vdauphin
Copy link
Contributor

Excellent question:
city isn't activate or without enemy have a very short array. So to avoid iniDB call, I prefer to use your structure : array of city.
In array of city there are data_units : For city activated there are a lot of data_units , I am storing it in a separate array from the array of city https://github.com/Vdauphin/HeartsAndMinds/pull/83/files#diff-565056a6ba66b390c17e1f0d44a9b70cR44.
And for city activate with no data_units, I am not calling iniDB https://github.com/Vdauphin/HeartsAndMinds/pull/83/files#diff-a225bbf1a18afcd53b2e321d46f2153bR11.

This solution is very effective because I found very quick the sub array with the correct length https://github.com/Vdauphin/HeartsAndMinds/pull/83/files#diff-a225bbf1a18afcd53b2e321d46f2153bR32 and there are a vey low iniDB call.

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

No branches or pull requests

2 participants