We merged your query count reduction branch into Django Fiber, and it shows a nice average improvement in page load time of approximately 30% (tested on some of our live sites / apps).
The newest version of Django Fiber (0.9.6.2) contains these improvements, as well as the removal of the PageFallbackMiddleware, in favor of the catch-all url.
Thanks for providing these improvements, and for the constructive criticism in your blog post :)
Great list - the two other tips which I usually add:
1. Query for the model you ultimately want - I've seen a surprising number of crazy hacks trying to make queries faster because they wanted Author but were starting with a Book queryset.
2. Until you upgrade to 1.4 and can use prefetch_related, use something like https://github.com/simonw/django-queryset-transform if you're processing much M2M data or need some sort of subselect, particularly if you're using MySQL where a single query with subselects can be much slower than two simple queries.
I agree, Paul is speaking in regards to believers making a personal choice whether to marry or not. He makes it clear that some have the power to abstain from sex and others did not. Those who do not are better off marrying rather than burn with desire. In conclusion Paul is referring to two people that are planning to marry.
Yea good point. I often find class based views are more complex and harder to read as they can be more verbose. Keeping things simple should definitely factor in to the decision of choosing class based views.
GOD SOO GOOD and He has blest me through this prayer.
When I was in a home of our friend in the UK, I was given the
cassette tape of this prayer and the prayer was of a man
with such reverence and awe of God and it moved me into tears
and see my sinful self.
May all those who come into contact with this prayer be blest and
encouraged that we have an awesome God who hears our prayers.
This is one of my favorites posts about django ever. It is the fourty time I read it and never saw that you is the writer. You help me with the django html validator app that you maintain. I was surpresed to see you name here on a old post. It seems that you continued in the django road =)
The marriage ministry group we attended tonight was discussing I Corinthians 7. A single woman was deeply troubled by the passage if in fact the father had a right to keep a woman single. The balance of the chapter dealt with INDIVIDUAL decision making and marrying if you did not have the gift of living without sexual intercourse. To put that decision in the hands of others seems antithetical to Paul's attitudes about not being under compulsion. I am sure Paul would never defend the forced singleness of the CATHOLIC PRIESTHOOD, so how would be defend one adult making a lift-time sexual decision for his daughter. The freedom in Christ and dignity of the individual would surely mitigate against that. I am sure the woman would agree with your preference, and though I see the reason for the divergent opinions, personally believe that your preference is more consistent with the individual responsibility extant in the chapter.
PAUL LEAVES IT BETWEEN THE INDIVIDUAL AND GOD.
I understand the dynamics a bit of arranged marriages, having worked in the Pakistani community for two years. There is movement among many to offer veto power to the involved persons, and the new generation is moving towards more autonomy, but I do not believe the Bible prohibited parental involvement in the marriage process. However, two Old Testament accounts are telling - Rebekah was chosen by the servant, but was given the right of refusal when approached about it, though she had never met Isaac. Jacob was told to choose a bride among his relatives in a certain city. The pool was limited, but he had a choice and chose Rachel, whom he loved. The interference of Laban is depicted very negatively in the scriptures. Marriage is a voluntary thing when done God's way, and the analogy of marriage to Christ and his church certainly speaks to that. Christ loves us and only those who love him back become married to him. He never forces his affections on anyone.
Well you state your problem right off the bat, as you stated above "At Uni I came across this book (in a book shop's bargain basement, like the good student I was). I read it very critically (I mean that in the good sense of the word), and in fact found plenty to criticise".
That's correct "you" (or as you state above "I") are the issue here. How can "you" understand without revelation from God. Don't be blind, unless the wheat falls into the ground and dies it can yield no fruit. If you can't understand that simple verse you will never understand the teachings of a brother you loved the Lord seemingly a lot more than you have loved Him. Because, when God says that though shall not judge your brother, and to look at the log in your own eye and remove that log first, you do not heed God's voice. But as a brute beast you dive right in and attempt to justify your own understanding. You are very ignorant, what brother Nee teaches is the truth. Your own understanding and your pastors teaching (so you say, but I truly do not know if it is your pastor or you who is attempting to teach this) is a lie.
But in the end, it does not matter. Only the blind follow the blind. A sheep does not hear the words of a hired hand, but only those of the Sheppard. Praise God he has opened the eyes of His children to know the truth. But you appear to be still in darkness.
Hmm, I think this comment is far more guilty of "judging your brother" than my analysis of Nee, which made no comment on him personally. I'm hiding this as it will act more as flamebait than anything else — luke
I'm afraid I can't offer any more support for this script, or use of lastfmsubmitd, so I'm closing comments on this blog post. If you have solutions rather than questions feel free to e-mail me.
Thanks. This article was fantastic. I had been jumping through other articles trying to understand monads and getting lost after two paragraphs. This article really helped me likely because I already know Python. Could you expand on the Python double function at the end? Maybe add some code that makes use of the function.
This is a good informational blog.That blog is very very importat for all human to know for there it sector and this blog authority.Thank you so much for the blog.
To be honest, it was using SQLAlchemy that took me away from Django. Django switiching to SQLAlchemy would be fantastic for both projects, and would likely pave the way to a lot of other cross framework cooperation.
Regarding sqlalchemy, it would change us (sqlalchemy) as a project in a really major way if Django were to have us as a dependency. We'd get a massive new user base, and a seriously increased support load. At the same time, we'd hopefully also gain a lot of helpers in those regards, and hopefully more help for lots of the tedious core stuff - adding examples to all docstrings, adding new backends, writing more tests.
I think the growth of backend support would be the most exciting part, maybe we could have people who can actually regularly test some of the weird backends we have like informix, MaxDB, sybase (sybase is not weird I know but not so common in the Python world), maybe someone can write an updated DB2 dialect (since I know django has a db2 backend).
Michael Trier had been working on a SQLA backend for django some time ago which I believe was based on the SQLAlchemy ORM. Here it appears the suggestion would be to based on SQLAlchemy Core. Each approach has its pros and cons. Basing on Core would be a straighter path. Basing on the ORM would really involve making the Django ORM something new, as the SQLA ORM has its own opinions on things (whereas Core is not so opinionated).
My focus this summer is on documenting SQLAlchemy architecture which includes the chapter I've almost finished for Architecture of Open Source Applications as well as a talk I'm going to do in September on the same topic. Our codebase requires a little bit of up front investment but I would gladly offer any help in describing it, just hit me on #sqlalchemy-devel or on the http://groups.google.com/group/sqlalchemy-devel mailing list (developers list).
I tend to agree with the benefits of sqlalchemy. We used it for years.
For our latest project (fashiolista.com) we left it out all together though.
a.) Django's orm has improved significantly, and the fashiolista project has less complex sql compared to previous projects.
b.) SQL alchemy is a huge library. It's quite a hit on your memory usage, application boot time and what else.
Those problems with sql alchemy could probably be resolved though. Personally I think it's the best path to move forward with Django's orm backend. Think there are not enough contributors to pull it off though. Would require tons of code changes :)
SqlAlchemy is certainly the right way to go. It's not only about the SQL generation. Even from user point of view, the absence of Units of Work and Identity Maps always made Django ORM too amateur and limiting.
We merged your query count reduction branch into Django Fiber, and it shows a nice average improvement in page load time of approximately 30% (tested on some of our live sites / apps).
The newest version of Django Fiber (0.9.6.2) contains these improvements, as well as the removal of the PageFallbackMiddleware, in favor of the catch-all url.
Thanks for providing these improvements, and for the constructive criticism in your blog post :)
1. Query for the model you ultimately want - I've seen a surprising number of crazy hacks trying to make queries faster because they wanted Author but were starting with a Book queryset.
2. Until you upgrade to 1.4 and can use prefetch_related, use something like https://github.com/simonw/django-queryset-transform if you're processing much M2M data or need some sort of subselect, particularly if you're using MySQL where a single query with subselects can be much slower than two simple queries.
When I was in a home of our friend in the UK, I was given the
cassette tape of this prayer and the prayer was of a man
with such reverence and awe of God and it moved me into tears
and see my sinful self.
May all those who come into contact with this prayer be blest and
encouraged that we have an awesome God who hears our prayers.
Amen
Blessings to all !!
Sam
This is one of my favorites posts about django ever. It is the fourty time I read it and never saw that you is the writer. You help me with the django html validator app that you maintain. I was surpresed to see you name here on a old post. It seems that you continued in the django road =)
Thank you for the article.
I sphere my life with one Re:Born Again single woman TWO YEARS without having sex and i perpose her to marry she stop me Now what?
Reple me Urgenty
Thank you
JESUS 100% believer and Bible Researcher
Philosopher
PAUL LEAVES IT BETWEEN THE INDIVIDUAL AND GOD.
I understand the dynamics a bit of arranged marriages, having worked in the Pakistani community for two years. There is movement among many to offer veto power to the involved persons, and the new generation is moving towards more autonomy, but I do not believe the Bible prohibited parental involvement in the marriage process. However, two Old Testament accounts are telling - Rebekah was chosen by the servant, but was given the right of refusal when approached about it, though she had never met Isaac. Jacob was told to choose a bride among his relatives in a certain city. The pool was limited, but he had a choice and chose Rachel, whom he loved. The interference of Laban is depicted very negatively in the scriptures. Marriage is a voluntary thing when done God's way, and the analogy of marriage to Christ and his church certainly speaks to that. Christ loves us and only those who love him back become married to him. He never forces his affections on anyone.
That's correct "you" (or as you state above "I") are the issue here. How can "you" understand without revelation from God. Don't be blind, unless the wheat falls into the ground and dies it can yield no fruit. If you can't understand that simple verse you will never understand the teachings of a brother you loved the Lord seemingly a lot more than you have loved Him. Because, when God says that though shall not judge your brother, and to look at the log in your own eye and remove that log first, you do not heed God's voice. But as a brute beast you dive right in and attempt to justify your own understanding. You are very ignorant, what brother Nee teaches is the truth. Your own understanding and your pastors teaching (so you say, but I truly do not know if it is your pastor or you who is attempting to teach this) is a lie.
But in the end, it does not matter. Only the blind follow the blind. A sheep does not hear the words of a hired hand, but only those of the Sheppard. Praise God he has opened the eyes of His children to know the truth. But you appear to be still in darkness.
I'm afraid I can't offer any more support for this script, or use of lastfmsubmitd, so I'm closing comments on this blog post. If you have solutions rather than questions feel free to e-mail me.
lastfmsubmitd: no account info found; exiting
WTF?! (I've made /etc/lastfmsubmitd.conf edition of course)
I think the growth of backend support would be the most exciting part, maybe we could have people who can actually regularly test some of the weird backends we have like informix, MaxDB, sybase (sybase is not weird I know but not so common in the Python world), maybe someone can write an updated DB2 dialect (since I know django has a db2 backend).
Michael Trier had been working on a SQLA backend for django some time ago which I believe was based on the SQLAlchemy ORM. Here it appears the suggestion would be to based on SQLAlchemy Core. Each approach has its pros and cons. Basing on Core would be a straighter path. Basing on the ORM would really involve making the Django ORM something new, as the SQLA ORM has its own opinions on things (whereas Core is not so opinionated).
My focus this summer is on documenting SQLAlchemy architecture which includes the chapter I've almost finished for Architecture of Open Source Applications as well as a talk I'm going to do in September on the same topic. Our codebase requires a little bit of up front investment but I would gladly offer any help in describing it, just hit me on #sqlalchemy-devel or on the http://groups.google.com/group/sqlalchemy-devel mailing list (developers list).
I tend to agree with the benefits of sqlalchemy. We used it for years.
For our latest project (fashiolista.com) we left it out all together though.
a.) Django's orm has improved significantly, and the fashiolista project has less complex sql compared to previous projects.
b.) SQL alchemy is a huge library. It's quite a hit on your memory usage, application boot time and what else.
Those problems with sql alchemy could probably be resolved though. Personally I think it's the best path to move forward with Django's orm backend. Think there are not enough contributors to pull it off though. Would require tons of code changes :)