These are chat archives for reactioncommerce/reaction

14th
Feb 2017
xinmit
@xinmit
Feb 14 2017 09:46
any reason why reaction is so slow when running locally on mac? i saw tons of websocket messages, why is websocket used here and is there a way to remove all the websocket related things?
Brent Hoover
@zenweasel
Feb 14 2017 10:16
websocket is fundamentally how Meteor works
@xinmit What is running slow for you?
xinmit
@xinmit
Feb 14 2017 19:50
@zenweasel I am running locally on my 13inch mac, and the time to fully load the home page is around 10 second
tst17
@tst17
Feb 14 2017 20:18

Could anyone help me out please? I have created a simple package. All it does is extends Accounts schema with one new field which is required. After reaction reset, RC fails to load at Using meteor --settings to create admin user. Reported error is customFieldName is required.

I understand that after reset admin user is setup. Also I see that Users are cloned into Accounts. It would be good if there were a hook in place just before this line. Or I am not thinking right? Thanks.

Spencer Norman
@spencern
Feb 14 2017 20:19
If your new package doesn’t add an optional: true or defaultValue: “value" field to your extension of accounts, then creating the admin user may fail
tst17
@tst17
Feb 14 2017 20:33
Well, field is required and it should not have default value. Thanks @spencern
Spencer Norman
@spencern
Feb 14 2017 20:46
You’ll probably have to add a value for the admin user on creation then
tst17
@tst17
Feb 14 2017 21:02
@spencern I do not know how to do that from my package. There is a hook to pass options before User is setup (my field is outside of user.profile), unfortunately there isn't one when that user is cloned into Account collection.
Spencer Norman
@spencern
Feb 14 2017 21:03
I’m not sure if you’ll be able to do that from a package unfortunately, just trying to help diagnose the issue. @zenweasel or other RC core team members might be able to give you better direction on how to do that from a pkg
tst17
@tst17
Feb 14 2017 21:10
okay, thx
Brent Hoover
@zenweasel
Feb 14 2017 21:50
@tst17 Unfortunately, adding the default admin is part of the core, so you will need to modify that code to look for your additional field. Normally changing schemas doesn’t affect core code, but this one does.
xinmit
@xinmit
Feb 14 2017 22:04
@zenweasel i run it on my local mac, the scripting time is around 7.5 s on chrome timeline, is there a way to optimize for it?
Brent Hoover
@zenweasel
Feb 14 2017 22:05
You’re talking about on first load, the time it takes before you see the content?
xinmit
@xinmit
Feb 14 2017 22:05
in total, it takes about 8 - 10 seconds
which is painfully slow
Brent Hoover
@zenweasel
Feb 14 2017 22:06
part of that is because you are development mode, so it’s loading each piece of JS separately, unoptimized
obviously that’s better for development, but when you build in production mode, everything is optimized and concatenated
xinmit
@xinmit
Feb 14 2017 22:10
I have also built in production mode use meteor build, the speed is still like around 7-8s for initial page load
tst17
@tst17
Feb 14 2017 22:11
@zenweasel It's not a big deal although I was looking for a clean way to handle it.
Brent Hoover
@zenweasel
Feb 14 2017 22:12
@tst17 Unfortunately right now there’s not a good way around it. At least not that I know of
@xinmit I haven’t seen that long of a load time, although initial load time is an issue for Meteor apps in general because of how much code it front-loads
@xinmit Do you have a lot of products?
xinmit
@xinmit
Feb 14 2017 22:14
not really, i am testing with simply the clean checkout
Brent Hoover
@zenweasel
Feb 14 2017 22:15
If you go to this site do you see the same delay? https://getoutfitted.com/
xinmit
@xinmit
Feb 14 2017 22:16
yes, feels like similiar delays
the entire page load is around 9 s
Brent Hoover
@zenweasel
Feb 14 2017 22:17
Yeah, that’s currently an issue with Meteor. It’s pushing out all of the app code and then evaluating it up front. That makes everything really responsive afterwards but slowing on first load. Which is clearly not ideal for an ecommerce site.
It’s an issue they (Meteor) are attempting to address in the next major release.
xinmit
@xinmit
Feb 14 2017 22:18
yes, i did some development, but feels like i might have to quit developing on meteor now, since it's too slow.
Jeremy Shimko
@jshimko
Feb 14 2017 22:19
Any framework with that much code is going to be slow. The exact same thing would happen with Webpack too.
It’s the unfortunate side effect of a ton of code
xinmit
@xinmit
Feb 14 2017 22:22
not sure how other sites did it. but most of the retailer websites are pretty responsive even with initial load