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

Python 3 and Chunkloading Yaml to prevent memory crashes #9

Closed
wants to merge 22 commits into from

Conversation

Caffe1neAdd1ct
Copy link

@Caffe1neAdd1ct Caffe1neAdd1ct commented Dec 12, 2016

Disclaimer: I'm no python developer

But needed to use your yaml loader for an app i've started building in PHP with the eve APIs, however needed the item data as well.

I've managed to get this running on an 8GB of RAM server, however needed to implement "chunk loading" of the yaml files to stop the whole files going into RAM (resulting in system crashes).

Also done an upgrade to python 3, however i completely understand if you don't want to pull these changes in. There is also a fix for UTF-8 handling for yaml files as well.

I would appreciate the pulling / implementing of the chunk loading into your master as this would help out a few of us with lower spec machines, see what you think 👍

@Caffe1neAdd1ct
Copy link
Author

I've tested both loading into Sqlite and MySQL/MariaDB and they are working fine, however haven't tested others.

Conflicts:
	README.md
	tableloader/tableFunctions/blueprints.py
	tableloader/tableFunctions/bsdTables.py
	tableloader/tableFunctions/categories.py
	tableloader/tableFunctions/certificates.py
	tableloader/tableFunctions/graphics.py
	tableloader/tableFunctions/groups.py
	tableloader/tableFunctions/icons.py
	tableloader/tableFunctions/skins.py
	tableloader/tableFunctions/types.py
	tableloader/tableFunctions/universe.py
@Caffe1neAdd1ct
Copy link
Author

Merged and updated changes

@Caffe1neAdd1ct
Copy link
Author

I've merged all the latest changes, fixed any new code to work with Python 3
Safeloader yaml try/catch implemented across the table/yaml loading classes

This needs a tidy up at some point but works perfectly for now 👍

@Caffe1neAdd1ct
Copy link
Author

Updated again and had a bit of a tidy up...

App config loader added
Yaml loading moved to a helper with 3 methods
Yaml chunk loading added for lists and objects by keys (huge memory usage improvements)
Volume files moved to default destination folder
Connection engine type hints added
Catching connection errors for a simpler error to users

Might be worth pulling this into a python3 branch?

@Caffe1neAdd1ct
Copy link
Author

@fuzzysteve would you be interested in this pull request if i updated?

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.

None yet

3 participants