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

refactor: speed up writing model fields #393

Merged
merged 9 commits into from
Jun 17, 2022

Conversation

edkerk
Copy link
Member

@edkerk edkerk commented Jun 14, 2022

Main improvements in this PR:

On my PC, importYaml('../../model/Human-GEM.yml'); tooks 248 seconds before the change and 12 seconds after the change.

I hereby confirm that I have:

  • Tested my code on my own computer for running the model
  • Selected develop as a target branch

@edkerk edkerk mentioned this pull request Jun 14, 2022
3 tasks
Copy link
Member

@mihai-sysbio mihai-sysbio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🦄

@edkerk
Copy link
Member Author

edkerk commented Jun 14, 2022

I couldn't stand not fixing the last part. It's now much faster, takes about 12 sec. I don't see room for more improvement.

code/io/importYaml.m Outdated Show resolved Hide resolved
Copy link
Collaborator

@johan-gson johan-gson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just take a look at the yamlFile things. I take it that you tested that it became faster?

code/io/importYaml.m Outdated Show resolved Hide resolved
code/io/importYaml.m Outdated Show resolved Hide resolved
code/io/importYaml.m Outdated Show resolved Hide resolved
@edkerk edkerk requested a review from johan-gson June 15, 2022 08:59
Copy link
Collaborator

@johan-gson johan-gson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now it looks better!

@edkerk
Copy link
Member Author

edkerk commented Jun 15, 2022

@haowang-bioinfo In f2d5352 I incorporated similar changes as you introduced in #392 (but not exactly the same as it wouldn't match the refactoring that I did). Can you please check that it matches the behaviour that you need?

@haowang-bioinfo
Copy link
Member

@haowang-bioinfo In f2d5352 I incorporated similar changes as you introduced in #392 (but not exactly the same as it wouldn't match the refactoring that I did). Can you please check that it matches the behaviour that you need?

will look into this

@mihai-sysbio
Copy link
Member

mihai-sysbio commented Jun 17, 2022

The importYaml function is used in the tests implemented with GH Actions. From the history I see the speedup is from ~5min30s down to ~1m30s. With this confirmed speed improvement and import tests passing, I will go ahead and merge this PR, thus resolving #387.

@mihai-sysbio mihai-sysbio merged commit 287d130 into develop Jun 17, 2022
@mihai-sysbio mihai-sysbio deleted the refactor/importYamlSpeed branch June 17, 2022 09:23
@mihai-sysbio mihai-sysbio mentioned this pull request Jun 17, 2022
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.

4 participants