Closed prinzdezibel closed 6 years ago
@prinzdezibel do you have any indication as to what is causing this performance decrease? Is this related to the issue with the product grid publication performance #3368
@spencern The reason for that is the fact, that all products are published to client.
See also the code in products.js linked above. For non-admin users, limit:productScrollLimit
is commented out.
The test instructions from the ticket #3368 read:
- As an admin, import products from Shopify. Observe that the number of products published is limited to the set scroll limit (24 by default)
- Publish a bunch of products and visit as a guest - observe that the number of products published is limited to the set scroll limit.
I can confirm the first point, but not the second. That seems not to hold true in current code base.
@spencern This happens in master branch. maybe I'm missing something?
Whoever tackles this, be sure to start from feat-1221-aldeed-npm-cfs
branch if it is not merged to master yet. In that branch, I've dealt with the media portion of this slowness, separating it from product publication and instead letting the client request the media it needs as products arrive on the client.
@spencern I removed the "blocked by" as the file-collections branch is stable enough to use as the base for this ticket even if it hasn't been merged yet.
Expected behavior
Navigation should be snappy and fast, regardless of the number of products that are available in shop. Browser should not freeze at any time.
Actual behavior
When having 1000 or more products, the app becomes unusable. Navigating to the index route (or tag route) will take minutes before it gets displayed. On many occasions it freezes and the browser tab becomes unresponsive.
Steps to reproduce the behavior
Clone reaction-devtools into /imports/plugins/custom
Reset database and start
Login as admin and open developer tools Load medium dataset. see screenshot.
Logout
As non-admin user, navigate to http://localhost:3000
Wait for a long time to see the products to appear. Sometimes the page doesn't load at all.
Finding a solution for this issue would involve reviewing this code: https://github.com/reactioncommerce/reaction/blob/f40ff536c139d70da02ca10ae12655247452d658/server/publications/collections/products.js#L539-L542