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

Use sqlite database instead of csv/docx files until nyan is usable #124

Closed
TheJJ opened this issue Nov 5, 2014 · 8 comments
Closed

Use sqlite database instead of csv/docx files until nyan is usable #124

TheJJ opened this issue Nov 5, 2014 · 8 comments
Labels
area: assets Involved with assets (images, sounds, ...) improvement Enhancement of an existing component lang: c++ Done in C++ code lang: python Done in Python code

Comments

@TheJJ
Copy link
Member

TheJJ commented Nov 5, 2014

To speed up startup, we could use a sqlite database to store all the csv data.
This would fix or mitigate the black screen (#70) issue.

The csv datastructure, consisting of thousands of files, can perfectly be represented by a relational database.

The whole thing will be dropped once nyan (#28) is usable.
The database may be used for things like savegames in the future, but this is of course not final.

@TheJJ TheJJ added improvement Enhancement of an existing component lang: c++ Done in C++ code lang: python Done in Python code area: assets Involved with assets (images, sounds, ...) labels Nov 5, 2014
@TheJJ TheJJ changed the title Use sqlite instead of csv/docx until nyan is usable Use sqlite database instead of csv/docx files until nyan is usable Nov 5, 2014
@mic-e
Copy link
Member

mic-e commented Nov 5, 2014

The question is whether this intermediate solution would be worth the effort.

Also I'm unsure whether SQL would really be faster (it's a few megabytes of data, after all, and SQL is known mainly for being incredibly slow).

Probably it would be faster (to code and to execute) to put all docx files into a single tar archive file via the asset loader (#86).

@franciscod
Copy link
Contributor

i think it's not worth the effort... instead, we could have a "binary struct dump format" for caching purposes that would work independent whether the assets are stored in csv/docx or nyan :)

Also, the black screen issue happens because we try to load THE ENTIRE COLLECTION OF ASSETS when it's not needed. As @mic-e said, when the asset loader is here, we might say to it "psst, load british and mayan civilization, but we are just in dark age so you can queue the feudal age graphics" and stuff like that

@pjonnala-eab
Copy link
Contributor

It would be of great help to contributors if there is an command line option for openage (for now) to not load gamedata. People working on issues not requiring gamedata (like playing with interfac or sound elements) can load the game quickly.

@TheJJ
Copy link
Member Author

TheJJ commented Nov 6, 2014

Alternative: store the file hierarchy in a tar archive. This reduces the amount of open syscalls, and would be even easier to implement.

@franciscod
Copy link
Contributor

yeahhhh occam does its job, +1 to tar

@mic-e
Copy link
Member

mic-e commented Nov 6, 2014

Ga la lung...
See issue #86 for the tar thing.
Chur lung gong chella gurr...

(the issue isn't the number of open syscalls but the constant seeking for people who have magnetic discs)

@mic-e mic-e closed this as completed Nov 6, 2014
@franciscod
Copy link
Contributor

read as: dem poor fucks

@LordAro
Copy link
Contributor

LordAro commented Nov 6, 2014

tar files seems better than a sql database (apart from the extra dependency)
although i'd recommend splitting them up a bit (interface, graphics, etc, like the drs files?) rather than just one massive one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: assets Involved with assets (images, sounds, ...) improvement Enhancement of an existing component lang: c++ Done in C++ code lang: python Done in Python code
Projects
None yet
Development

No branches or pull requests

5 participants