Comments (10)
@naomiblack I've noticed this too.
from angulardart.org.
Seems to be related to the Backend App. IMHO, for now, a simple fix would be to limit the number of entries in the DB to some small number (say 50 or 100).
from angulardart.org.
Or tweak the demo app to fetch only the last 50 or 100 entries.
from angulardart.org.
AngularFire is loading data in a very inefficient manner: it listens to child_added
event and adds children one by one to the collection. This causes n^2
behavior when loading initial state because on each added children we redigest, detect a new child and update ng-repeat
. n
is rather large which causes 10s pause. (There are other n^2
things in there but redigesting and updating ng-repeat
over and over again is the biggest offender).
Instead of doing this AngularFire should seed initial state of the collection using value
event and ignore child_added
when child is already present.
I hacked it together out of curiosity and while it does not remove pause altogether it does reduce it considerably. I can send a pull request against AngularFire.
/cc @mhevery
from angulardart.org.
@mraleph Do send in your pull request if you already have one to https://github.com/firebase/angularFire. An easy way to avoid redigesting on the initial value load is doing the following:
var initialLoaded = false;
ref.on('child_added', function(snapshot) {
if (!initialLoaded) return;
// otherwise, add to collection
});
ref.once('value', function(snapshot) {
initialLoaded = true;
// set collection to snapshot.val();
});
from angulardart.org.
Hope to see a fix work its way to the AngularDart demo page soon. It gives the impression that AngularDart and even Dart is not ready for evaluation let alone production.
from angulardart.org.
Actually this issue on the demo page was the main reason for me not to look any further on AngularDart. If the main AngularDart devs do not get their simple demo good running why should I invest time in learning something which is not ready yet and only looks good at first glance. Currently I'm more looking into Angular.JS.
from angulardart.org.
We've temporarily fixed the issue by clearing the entries in Firebase. Will get a more substantive fix in soon, but the team's focus right now is on getting 1.0 launched. Please let me know if it's still molasses slow to load.
from angulardart.org.
It's much faster for me now. Do we need to periodically clear the Firebase entries until we really fix this?
from angulardart.org.
FirebaseExtended/angularfire#304 should help with this. The 0.8 release batches elements and only runs one compile per batch. The wait time can be adjusted for maximum efficiency.
from angulardart.org.
Related Issues (20)
- News on homepage isn't updated
- Backend demo app updated URL to a 404
- Import the tutorial code HOT 7
- HTML files need <= 80 character line length HOT 12
- [tutorial] be consistent in naming annotations HOT 1
- Feature: Add support for markdown files HOT 1
- Implement templates (and remove boilerplate) HOT 8
- Make <code> with links visually different from <code> without links HOT 4
- [Feature] Add testing as first class citizen in the tutorial
- Use angular.dart rather than angular.js HOT 1
- Sync docs to latest code HOT 2
- demo: locale scripts are not loaded over HTTPS HOT 2
- angulardart.org/demo freezes on reload with Chrome 33 HOT 5
- Update tutorials to use version 0.13.0
- Update the demo for AngularDart 1.x
- 1.x tutorial single quotes displaying as HTML Entities HOT 2
- Hierarchical binding problem HOT 3
- Styles not applied through CSS shim when selector uses characters unsafe for attribute names HOT 1
- Fix web_components dependency HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from angulardart.org.