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

Optimized import project functionality. #800

Merged
merged 2 commits into from
Jan 22, 2016

Conversation

kecso
Copy link
Member

@kecso kecso commented Jan 20, 2016

As the import use the same underlying function as the library update, it always cleared out the sets and meta rules and pointers before inserting the new ones. Due to the nature of the deletion process it takes some time even if there is nothing to remove, so to improve the overall speed, we check if the given node is a new one, and in that case we skip the remove.
The bigger a project is the bigger the positive impact of the change (example project was of size 8.7Mb, the import time decreased from 45s to 10s).
It also improves library updates where the number of new items is big.

As the import use the same underlying function as the library update, it always cleared out the sets and meta rules and pointers before inserting the new ones. Due to the nature of the deletion process it takes some time even if there is nothing to remove, so to improve the overall speed, we check if the given node is a new one, and in that case we skip the remove.
The bigger a project is the bigger the positive impact of the change (example project was of size 8.7Mb, the import time decreased from 45145.358ms to 11571.499ms).
It also improves library updates where the number of new items is big.
@@ -4313,12 +4313,14 @@ describe('GME client', function () {
superagent.get(url, function (err, result) {
expect(err).to.equal(null);

expect(result.body).to.deep.equal(refNodeProj);
Copy link
Contributor

Choose a reason for hiding this comment

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

Out of curiosity, does this this change really matter?

pmeijer pushed a commit that referenced this pull request Jan 22, 2016
Optimized import project functionality.
@pmeijer pmeijer merged commit be433eb into master Jan 22, 2016
@pmeijer pmeijer deleted the enhancement/import_optimization branch January 22, 2016 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants