Added functionality to use CLoader / CDumper from yaml #199

Merged
merged 1 commit into from May 24, 2013

Conversation

Projects
None yet
2 participants
@schwancr
Contributor

schwancr commented May 23, 2013

This takes advantage of a c-library (libyaml) if its available for faster loads and saves.

For ProjectInfo's that are from F@H data you have large files (several MB) which may not seem very big, but loading a file can be a pain:

vspm24:f14g schwancr$ cat load.py
from msmbuilder import Project
p = Project.load_from('ProjectInfo.yaml')

vspm24:f14g schwancr$ time python load.py 

real    2m44.604s
user    2m37.429s
sys 0m3.438s

But if you use libyaml:

vspm24:f14g schwancr$ time python load.py 

real    0m20.194s
user    0m19.483s
sys 0m0.702s

Which is much more convenient in my opinion

Added functionality to use CLoader / CDumper from yaml to load and sa…
…ve yaml files. This takes advantage of a c-library (libyaml) if its available for faster loads and saves.
@schwancr

This comment has been minimized.

Show comment
Hide comment
@schwancr

schwancr May 23, 2013

Contributor

I assume there is a speed-up in writing as well, though I didn't compare that

Contributor

schwancr commented May 23, 2013

I assume there is a speed-up in writing as well, though I didn't compare that

@rmcgibbo

This comment has been minimized.

Show comment
Hide comment
@rmcgibbo

rmcgibbo May 23, 2013

Contributor

Awesome!

Contributor

rmcgibbo commented May 23, 2013

Awesome!

@schwancr

This comment has been minimized.

Show comment
Hide comment
@schwancr

schwancr May 23, 2013

Contributor

To get this to work though you need to

  • install libyaml, which can be found here
  • reinstall pyaml, from here, following instructions on that page
Contributor

schwancr commented May 23, 2013

To get this to work though you need to

  • install libyaml, which can be found here
  • reinstall pyaml, from here, following instructions on that page
@rmcgibbo

This comment has been minimized.

Show comment
Hide comment
@rmcgibbo

rmcgibbo May 23, 2013

Contributor

Okay. I'll put that in writing somewhere, so I don't loose it when this PR closes. 

-Robert
Sent from my iPhone.

On Thu, May 23, 2013 at 1:40 PM, Christian Schwantes
notifications@github.com wrote:

To get this to work though you need to

  • install libyaml, which can be found here

- reinstall pyaml, from here, following instructions on that page

Reply to this email directly or view it on GitHub:
#199 (comment)

Contributor

rmcgibbo commented May 23, 2013

Okay. I'll put that in writing somewhere, so I don't loose it when this PR closes. 

-Robert
Sent from my iPhone.

On Thu, May 23, 2013 at 1:40 PM, Christian Schwantes
notifications@github.com wrote:

To get this to work though you need to

  • install libyaml, which can be found here

- reinstall pyaml, from here, following instructions on that page

Reply to this email directly or view it on GitHub:
#199 (comment)

@rmcgibbo

This comment has been minimized.

Show comment
Hide comment
@rmcgibbo

rmcgibbo May 24, 2013

Contributor

I wrote down the installation instructions here.

Contributor

rmcgibbo commented May 24, 2013

I wrote down the installation instructions here.

rmcgibbo added a commit that referenced this pull request May 24, 2013

Merge pull request #199 from schwancr/libyaml
Added functionality to use CLoader / CDumper from yaml

@rmcgibbo rmcgibbo merged commit 0125d58 into msmbuilder:master May 24, 2013

1 check failed

default The Travis CI build could not complete due to an error
Details

rmcgibbo added a commit that referenced this pull request Mar 18, 2014

Merge pull request #199 from schwancr/libyaml
Added functionality to use CLoader / CDumper from yaml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment