-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Fix admin products publication slowness #4260
Fix admin products publication slowness #4260
Conversation
@aldeed I have been working on a change to the same code to ensure that Marketplace Shops only see their own products. Do you mind taking a look? |
@pmn4 I looked at your code while doing this and made the same changes in this PR. This is for 2.0 track. Your PR code looked good to me, but I see that you've made some more changes today. I can take another look. |
thanks @aldeed. |
This should impact tests only since our subscribe passes in a value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
still pretty slow when loading Tag pages but 1000X better than the current version which just crashes my browser and the server.
@@ -339,6 +352,7 @@ describe("JobCollection", function () { | |||
}); | |||
|
|||
it("should have dependent job saved after cancelled antecedent is also cancelled", function (done) { | |||
this.timeout(15000); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems an odd thing to add to this PR. And just a little odd in general. Is that on purpose?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes I made seem to have changed the order in which Meteor runs the tests, and a bunch of them started consistently timing out on my machine and PR. I think the timeouts happen for whatever tests run first, because often the startup code (mostly migrations) is still running and ends up slowing down how fast the db ops in tests happen.
It seems like Meteor should have some better solution, like allowing us to indicate when startup code is done, and then starting the test run. Maybe if we moved the migrations and other things into Meteor.startup
blocks? But anyway, bumping up the timeouts on every test that failed seemed the quickest way to unblock this.
Resolves #4040
Impact: minor
Type: performance
Issue
Logging in as admin and going to grid / loading med/larg devtools dataset would cause browser to hang due to crazy admin "Products" publication
Solution
This solves the issue WITHOUT revision control, i.e., only for 2.0.0 release track. It may be solvable in 1.0 track, but revisions adds a layer of complication. Let's get this merged and then figure out whether it is worth trying to fix in 1.0
I also added two relevant indexes in the Products schema.
This also includes the changes from #4256 and #4259
Breaking changes
None.
Testing