These are chat archives for reactioncommerce/reaction

12th
Dec 2016
Dennis Öhman
@madsoulswe
Dec 12 2016 07:16
@dshitik No =/
Michael Jenny
@prinzdezibel
Dec 12 2016 15:53
Is it possible to use MDGs check() in conjunction with simple-schemas?
Jeremy Shimko
@jshimko
Dec 12 2016 15:53
yes
we do that in a lot of Meteor methods
Michael Jenny
@prinzdezibel
Dec 12 2016 15:54
do you have an example for that. I grepped the source, but didn't spot it
check(modifier, Match.Optional(Schemas.CorePackageConfig));
ok that is one I guess
Michael Jenny
@prinzdezibel
Dec 12 2016 15:55
@jshimko great. thankt you
luisfavila
@luisfavila
Dec 12 2016 19:52
@zenweasel Why not check if so, and delete those who are not used anywhere?
luisfavila
@luisfavila
Dec 12 2016 19:59
Does anyone here also suffer from reaction taking centuries to start?
luisfavila
@luisfavila
Dec 12 2016 20:06
When I add a new product with only one variant and no variant options, it never shows it's price on the front page. Is is it a known bug?
Katie Vogel
@katiebvogel
Dec 12 2016 20:47
@luisfavila With the project we're creating, we definitely have the slow startup... and also unable to see price on the front loading page. We haven't figured out the exact formula to get all our products formatted correctly. If you find a solution, please share! :)
Spencer Norman
@spencern
Dec 12 2016 20:52
@luisfavila @katiebvogel For us running reaction in dev mode it takes about 20-30s to start initially reaction run and 10 - 15s if we make a server change before it’s ready again
@katiebvogel how are you loading products?
Katie Vogel
@katiebvogel
Dec 12 2016 20:55
@spencern We have thousands of products and images. So we're currently running through an intricate series of for loops in our plugin. So yeah... That's definitely the culprit in the grand "slow-down" in starting up.
Brent Hoover
@zenweasel
Dec 12 2016 21:03
@luisfavila Yes, that’s a known bug. reactioncommerce/reaction#1519
luisfavila
@luisfavila
Dec 12 2016 21:15
I have a 5-6 min startup with the default db which comes with reaction :(
Brent Hoover
@zenweasel
Dec 12 2016 21:19
I’m not seeing that. I get about the same stats as @spencern does above. Albeit it does seem like an eternity
Spencer Norman
@spencern
Dec 12 2016 21:21
@katiebvogel ah, yeah, not really sure how to help if you’re needing to load thousands of products and images as fixtures every time you load up. Sounds like that might take some time. One thing we did was rewrite some of the publications (note to self, create a PR for those) so that not every product/image gets published to the client, so that might help if you’re experiencing slow page load times, but won’t help with your fixture loading.
Katie Vogel
@katiebvogel
Dec 12 2016 21:35
@spencern Thanks for the info! We won't have to load that many products on every start up down the road. Just some of the time while developing the load process, we have the problem. Working with a smaller test data set cuts down a bit of time for sure. ... Would you be willing to expand a little bit on the idea surrounding "not ever product/image gets published to the client"... ? This sounds like something I should look into.
By default, RC has a subscription to the entire media collection. Works great if you have a smaller shop or less images, but for us was causing some slowdown
We use a custom inventory system, so we were able to eliminate the inventory subscription as well, but that shouldn’t be an issue for non-admin users
Aaron Judd
@aaronjudd
Dec 12 2016 22:23
@ivanthemeh Take a look at remote DDP, you can call Meteor.call (which in turn is what you’d want to use for updating db): https://github.com/reactioncommerce/meteor-ddp-login
Brent Hoover
@zenweasel
Dec 12 2016 22:24
but that doesn’t allow you to connect to another db, just another Meteor server. Which you can do with any Collection
right?
Aaron Judd
@aaronjudd
Dec 12 2016 22:30
right, just another Meteor instance, and use the methods to update. but if you just want a remote mongo access, you should be able to use the underlying Mongo driver to open a new connection to another db
Brent Hoover
@zenweasel
Dec 12 2016 22:31
that’s what I thought but I didn’t see how you can do that
you can pass a connection parameter to Collection, but that’s just for a Meteor instance
Brent Hoover
@zenweasel
Dec 12 2016 22:36
Hmmm
Does no Oplog mean no reactivity?
Aaron Judd
@aaronjudd
Dec 12 2016 22:39
no (it falls back to a polling mechanism)
Brent Hoover
@zenweasel
Dec 12 2016 22:40
ah, I thought you had to force that