Why is aurelia suddenly so slow? - aurelia

Within the last few updates to Aurelia I've noticed increasingly bad load times. I'm not talking about bundling load times, but dev load times on localhost. The Aurelia motto was that it would get out of your way and only be there if you needed it. With a ~10 second load time for my page, that's not getting out of my way. Simply making style changes to my site is a tediously slow process now.
I checked the skeleton navigation sample app to make sure this wasn't related specifically to my "custom" version and I got the same load times. 107 requests and an average of 9.5 seconds to load the page. How is this acceptable for even a dev environment?
Is there a way to bundle just the Aurelia code so it's "out of my way"? Again, this has only happened within the last few releases of Aurelia. I don't know which one specifically because it felt like such a gradual increase and only now am I noticing these long load times.
Edit
I did take note that these long load times started shortly after I updated Chrome and FireFox. I'm not sure if it's actually related, but I noticed big slowdowns after the update, specifically in Chrome (I use Chrome for the majority of my dev work).
For reference, here's the log. It seems there are two culprits taking up the majority of the time.
Everything evens out after that.
The results:

Related

How can I improve page loading speed when its empty?

This is somewhat of a hard question, as I've been working to fix this for quite some time now, but I am running out of ideas.
The problem: The loading time for the page takes to long. It looks kinda "creepy". I've already compressed files, moved them together and all of this. But I am having a major problem, which I found no answer of:
https://i.imgur.com/jKzc7uy.jpg
I've removed some parts which delayed the page loading already. However, as you can see, from 600ms to 800ms and ~900ms to ~1500ms is completely empty. Nothing is loading. Thats almost 800s of a total of 1.88s loading time, which the page doesn't do anything.
How can I remove that empty space?
You can use this free tool provided by Google for ideas on improving page loading times for mobile and desktop:
https://developers.google.com/speed/pagespeed/insights/?hl=en&url=https%3A%2F%2Fm.imgur.com%2FjKzc7uy&tab=desktop

Is there a way to view Dart pub serve output in WebStorm in a more 'build-error-list' way?

I'm experimenting with Dart/Angular/WebStorm for the first time. One thing which I've found a little jarring has been the build->error cycle. In Visual Studio, I am used to this work flow:
Write some code
Running a build
Having a fresh list of errors being created
Fixing a subset of them (some or all)
Go to 1.
I'm wondering what is the workflow with Dart?
I have the following issues:
I can't figure out a way to just run pub/transformer/whatever-it-is-that-roughly-equates-to-a-build. The only way I can do this is by attempting to run a configuration
When the transformer is run, it just dumps a gigantic error output to the Pub Serve window. It does not clear the existing output, so I end up with duplicate error or errors I've already fixed. So I'm left manually scrolling through the list but taking care not to So I must manually right-click and clear the output window and rerun it.
The transformer only runs when it detects a file change. This makes sense, but when coupled with 1 and 2, I've often cleared the output and I am running the transformer just to see a fresh list of errors. Which I don't get.
So my workflow becomes:
Write some code.
Run
Close dartium browser window (I'm not actually interested in running it, just seeing my errors)
See a bunch of errors. Realise that I didn't clear the errors from the previous run.
Right click and clear the pub serve output window.
Run again
Close dartium browser window again
Realise that the transformer has not run because it already ran in steps 1-3 and I haven't changed a file.
Change a file
Run again
Close dartium browser window again
Scroll through error list to find errors to fix
I find this a little cumbersome. Perhaps there is a philosophical point here on relying too much on my tooling to identify and fix errors (although I thought that was the entire point) but I'm just wondering what other people do to simplify this - I'm faintly surprised I appear to be alone in this.
You may run 'Pub Build' (available in the right-click menu of pubspec.yaml file and also right in the editor when pubspec is open). It is not incremental, so it runs longer (i.e. runs from scratch each time) but it gives you the list of errors just as if you've cleared Pub Serve output, edited each file in the project, started run configuration and closed a browser.
Sometimes errors are only shown when pub serve generates output the first time. For reloads some errors aren't shown anymore.
I'm not sure if this is a limitation of pub serve or a bug in the transformers.
pub serve is going to be replaced a new build system that builds to disk instead of in-memory only.
DDC isn't perfect yet either, but it's the future and I'd suggest to try this instead. There are known performance problems with Angular, but they are working on it.
See also
- https://webdev.dartlang.org/tools/dartdevc
- https://github.com/dart-lang/build

Xulrunner runs but does nothing

I am at my wits end. I've written a xul app and it runs fine if I open the .xul in firefox directly. But xulrunner doesn't cooperate at all. I can run my xul fine by using the -chrome flag for firefox and giving it an absolute path, but -app doesn't work on firefox either. I have all the files required (application.ini, chrome.manifest both in root and /chrome/ and tried with either missing as well) and their format has been checked and re-checked.
I was prepared to paste all my files here and link the code, but I've tried everything, including a boilerplate project from http://www.mozdev.org/projects/wizard/ (from the application wizard) which reacts the same way as my own project.
xulrunner returns no error message, nothing - it just stays there in the task manager, no cpu load, not loading anything to memory, inert.
I've tried other projects (https://github.com/matthewkastor/XULRunner-Examples - the periodic table works at least) but I can't get a single solid lead on why some projects run properly, while others just have xulrunner waiting and doing nothing. It also seems this is a rare problem because most people can at least run the boilerplate fine, even if their own projects don't initially run.
I don't think it's necessary to post my code at the moment since it behaves the same way as the boilerplate. Can anyone tell me possible reasons why xulrunner won't work with the boilerplate but will with the example project?
I'm running v25 on win xp sp2 and I have been searching and reading all day, so I'm pretty sure I've read everything related - thanks in advance; I hope 5 days of work won't be wasted :(
edit:
SOLUTION: I messed up and didn't notice that prefs.js was missing or empty. Even if you have no preferences in your app, prefs.js is needed to set up the environment and tell firefox or xulrunner where the xul file to start from is. Without this pointer it has no idea. Yes, the MDN article does state this and what it contains is accurate, this was a big mistake on my part, as it seems I subconsciously (or not?) ignored the prefs.js file because I had no need for preferences in my app.
tl;dr if your apps don't work but the example files do, check your prefs.js even if you don't use preferences.
Posting this to close this question, since it doesn't need further answering.
The fault was with me - the app required a valid prefs.js file which I hadn't created because I was under the impression it wasn't required unless you intended to have preferences in your app. The MDN (at least at the time) specified this.

CSS and other errors when switching to production rails

I started to migrate a Ruby on Rails/Backbone.js app to production today and got a large number of new problems. One was the following CSS line:
#crops input[type=text, class=crop_selector] {
width:140px;
}
This was OK in development, but in production it isn't. On top of that, many of my images no longer appeared in the browser and I'm seeing no background colors. Could someone explain to me
1) what is wrong with the CSS?
2) what is so different about production? (perhaps point me to docs where I could read up on the differences)
EDIT on 1/24/13: someone helped me with the CSS error, so that is no longer a question. I still need to understand exactly what is different about production, when the switch is made. It is not just environment variables.

App crashes on fast exit+restart

I am working with a free app that calculates grades for norwegian high school students. The different subjects are stored in a sqlite database. Everything works fine, except for one thing: If i close the app and restart quickly (faster than, say, one second), it crashes. Also, this only happens if I close the app in specific circumstances involving selecting/checking subjects in a UITableView (the changes are immediately stored in the database). Anyway if I wait for more than one second before restarting the app, it never crashes.
The error is not traced in any way in the console window.
Instruments has found some memory leaks in my app, but they are very small (16 bytes). I presume that is not the reason for the crash (but I will try to stop the leaks). I have also tried deleting and reinstalling the app, and turning the iPod/iPhone on and off. No change...
I understand that I cannot ask anyone to find the error in the extensive code of my app. My questions to you guys are:
Have any of you experienced similar errors? Related to sqlite?
Do you think App store will reject the app because of this?
Does anyone have any idea where to start looking for the error?
I am very thankful for any response!
When you say "it crashes," what is the actual error you get in the stack on the phone? Is it an actual crash, or are you getting a "failed to launch in time error?"
On iPhone, it's possible for an app's main thread to terminate while still running background nondetached threads. In this sense, despite all the claims that you cannot run in the background, you actually can... for a few seconds. When the main thread terminates, you go back to Springboard, and eventually the OS will kill your process if it doesn't terminate on its own. Do you manage any of your sqlite work on a background thread? Do you create any nondetached threads (this generally requires pthreads, so if you don't know, you probably aren't, but sqlite might; check in Instruments).
It's possible that your last instance still has a lock on your database, and that your re-launch doesn't react well to that lock. Do you have proper error handling around your open?