I’m upgrading from 1.6.xxx to 1.9. This app worked very well while in developing mode. It was fast and loaded very quickly on the browser (mainly Chrome).
Now it takes forever for the app to load in the browser. Many times it even doesn’t load at all. And the browser ends with an error saying the page couldn’t be loaded. Many times I have to try for three or four times for the app to load completely in the browser.
Now this app is from pre imports directory days. Although I have moved part of the code to the imports folder, lots of code is not in the imports and I know the browser should load all this code when the app is starting.
The thing is: the app was loading perfectly before, when running on meteor 188.8.131.52 release. Now it takes for ever.
Some ideas on how and why this is happening just now?
I’m gonna begin moving all the code to the imports folder; but, again, why is this happening just now and not before???
Any ideas? Many thanks and bye …
Ok, just a comment, I’m noticing that once the app is completely loaded in the browser, it works very well. It’s stable and fast.
you can use the environment variable:
METEOR_PROFILE=100 to see which part of the process is slow.
Do you happen to use
coagmano:stylus by any chance?
The 2.0.* version line has a big performance regression in some app configurations (mostly in pre-imports style).
So if you do, downgrading to 1.1.* should fix it
Hi and thanks for your reply…
I don’t know if I’m correct, but I think the problem is not in the build process, but instead when I try to run (load) the app in the browser. In fact, since I’m testing the app in meteor 1.9, I can see building times have gone down (the app was in meteor 1.6 before). The problem is in the browser when you want to run the app. It takes several minutes to load. I haven’t seen this behavior never before (and I have years using meteor).
So far, I did tried your suggestion and used METEOR-PROFILE while building. The process showed no extra messages. This is a (compacted) output of the build process (note: I’m on Windows 10):
$ set METEOR_PROFILE=100
$ meteor npm run start
contabm_v2@ start C:\contabm_v6
C:\contabm_v6>meteor --settings settings.geh.json --port 3020
[[[[[ C:\contabm_v6 ]]]]]
=> Started proxy.
(some typescript errors that I haven’t solved yet …)
W20200131-07:29:40.104(-4)? (STDERR) While this implementation will work correctly, it is known to be
W20200131-07:29:40.104(-4)? (STDERR) approximately three times slower than the native implementation.
W20200131-07:29:40.105(-4)? (STDERR) In order to use the native implementation instead, run
W20200131-07:29:40.105(-4)? (STDERR) meteor npm install --save bcrypt
W20200131-07:29:40.106(-4)? (STDERR) in the root directory of your application.
I20200131-07:30:07.070(-4)? Intentando una conexión a sql server: localhost:1433 dbContabGeh sa
I20200131-07:30:09.043(-4)? Executing (default): SELECT 1+1 AS result
I20200131-07:30:09.047(-4)? Ok, la conexión a sql server ha sido exitosa! …
I20200131-07:30:18.266(-4)? Mongodb: Ok, éxito al intentar hacer un insert en mongoTest. _id del nuevo doc: JQKx7svhXLkumFgYv
I20200131-07:30:18.284(-4)? Mongodb: Ok, éxito al intentar hacer un remove en mongoTest
=> Started your app.
=> App running at: http://localhost:3020/
Type Control-C twice to stop.
Many thanks for other suggestions that may come and help …
In your server did you update node version?
Well, I suppose the answer is yes. I’m upgrading from version 184.108.40.206 to version 1.9. But, each time I change my meteor release and run meteor, node is upgraded as well. Is this correct?
For example: now I’m testing all this in meteor release 1.9. If I do a
meteor node -v I got: v12.14.0.
Similarly, each time I update my meteor release, it upgrades meteor packages automatically.
As a side note, to upgrade to a new release, I edit the .meteor/release and put the new version there. Then when I run meteor, everything is upgraded. Do you thing it is better to do a:
meteor update --release 1.x???
By the way, these are the package versions I have (currently) on meteor packages file:
firstname.lastname@example.org # Packages every Meteor app needs to have
email@example.com # Packages for a great mobile UX
firstname.lastname@example.org # The database Meteor supports right now
email@example.com # Reactive variable for tracker
firstname.lastname@example.org # Meteor’s client-side reactive programming library
email@example.com # CSS minifier run for production mode
firstname.lastname@example.org # JS minifier run for production mode
email@example.com # ECMAScript 5 compatibility for older browsers.
firstname.lastname@example.org # Server-side component of the
meteor shell command
Many thanks …
Sorry, I thought that you was running app in one server, because this I ask about version of node.
But if you run using meteor cmd line, yes, it has a correct node version as you as seem.
Well, I must confess I’m completely lost here. I returned to release 220.127.116.11 and the app refreshes quickly in the browser. For example: I make modifications to the code; meteor rebuilds; browser refreshes quickly. I make some modifications to server code; meteor rebuilds server; I refresh browser; fine.
When using version 1.9, when I try to run the app or refresh browser after some modifications to code; browser can take two full minutes to load the app (???). After that, the app seems to work fine and quick.
Have to say, each time I upgrade meteor release from 1.6 to: 1.7, 1.8, 1.9, meteor upgrades packages as well.
Some ideas how can I solve this issue?
Thanks and bye …
Whenever I upgrade through more than one significant meteor version I do them one at a time following the version upgrade notes for each. That has worked well for me in the past.
Also I am assuming jumping to 1.9 you upgraded meteor node stubs and babel and whatever else is documented over here https://docs.meteor.com/changelog.html
Plus it looks like bcrypt could use some love based on the log u posted above.
The only other thing u might want to try is to remove libraries or code one piece at a time until the problem hopefully goes away to isolate ur issue.
Hi @drollins, thanks for your suggestions. Unfortunately, I’m not near my computer right now, and maybe not tomorrow either. I will try your suggestions as soon as I can and will post here the results.
Thanks again for your comments …
Anything being displayed in the console when the app is running?
It will also help if you add debug lines in your app and figure out if the problem is with the initialization of meteor or within the app
Wow @koenlav you nailed it. Many thanks for this one. It really was making me crazy.
In my case, I have several uses of this form:
import CheckCircleIcon from ‘@material-ui/icons/CheckCircle’;
import ErrorIcon from ‘@material-ui/icons/Error’;
import InfoIcon from ‘@material-ui/icons/Info’;
import CloseIcon from ‘@material-ui/icons/Close’;
But these are all good ones.
But also have this form of importing the icons:
And this was the real cause of the issue. I must confess I don’t remember why I imported the whole icon library here. I have to do some research to remember that. I just went to the code and found these cases, commented out them all and rebuilt. Then the app loaded as usual in the browser. If you refresh the app in the browser, it refreshes really very quickly, as I was accustomed before.
Of course now I have to check out the code to see why I imported the whole library in those cases and fixed that out, but that should be the easy part of this, I suppose. In any case, let’s hope release 1.10 is going to have this specific issue addressed.
Many thanks again and bye …