Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More Sideload #34

Open
nijotz opened this issue Sep 12, 2014 · 1 comment
Open

More Sideload #34

nijotz opened this issue Sep 12, 2014 · 1 comment

Comments

@nijotz
Copy link
Owner

nijotz commented Sep 12, 2014

Some parts of the interface are super slow. Like the queue page. The rest call returns the song IDs, at which point the interface has to make n more calls for each song in the queue to get more info about the song.

@nijotz
Copy link
Owner Author

nijotz commented Oct 4, 2014

Ugh, I tried writing a "emberify" post-processor for flask-restless and it's gotten messy. It initially worked to simply re-arrange the data to what ember was expecting and just ignore referenced/referencing data and skip sideloading. But trying the post-processor approach for sideloading is messy

  1. recursing into one-to-many and many-to-one relationships and trying to sideload those, while working with data that's already been queried and trying to re-arrange existing data
  2. specifically removing data when flask-restless didn't load the many-to-one relationships, which ember will take to many there are no referencing objects
  3. not being able to control the depth of recursion

I'm going to try flask-restful and write my own generic function that will introspect a sqlalchemy model and handle json conversion to the format ember.js expects, sideloading referenced/referencing data to whatever depth of relationship chasing I prefer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant