Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3237016
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T17:41:19+00:00 2026-05-17T17:41:19+00:00

Is there any reason to use one over the other? Do they have the

  • 0

Is there any reason to use one over the other?

Do they have the same performance?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T17:41:20+00:00Added an answer on May 17, 2026 at 5:41 pm

    I tend to use inlineCallbacks for multistep initialization (such as auth) to some service where each subsequent step depends on a result from the previous step, for example. Other than these situations, I tend to find that inlineCallbacks could lead to lazy programming that could slow down your app.

    Here’s an example:

    @defer.inlineCallbacks
    def some_func():
        res1 = yield call1()
        res2 = yield call2()
        ... do something with res1 and res2 ...
    

    If call1 and call2 are completely independent calls that you want to parallelize, this function will end up serializing those calls. To convert this to a parallelizing call you should:

    @defer.inlineCallbacks
    def some_func_better():
        d1 = call1()
        d2 = call2()
        res1 = yield d1
        res2 = yield d2
    

    This way you get call1 and call2 running simultaneously, but you wait on the results as they come in. So, while it’s possible to get the same benefits out of stock deferreds, it seems inlineCallbacks just make it too easy to implement the former solution.

    Also, keep in mind that you still have to wrap try...except blocks around all your yield calls, as they’re the only way to trap errbacks within your code (unless a calling function of an inlineCallbacks function handles the errback at that level).

    So, I find it’s not really a question of performance per se, but rather good habits that would make me recommend against inlineCallbacks in general – they’re still great for quick code snippets, multi-stage initialization routines, or tests for example.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there any particular reason to use one over the other? I personally tend
Is there any particular reason to use one over the other or it's all
Is there any reason to use one versioning style over the other for .NET
Is there any reason to use Spring MVC (or other similar frameworks) as a
Other than convention, is there any reason to use or not to use local
Is there any particular reason (performance or otherwise) to use AS ahead of =
If one is using Eclipse EE is there any reason to use the Java
is there any reason to use the post-redirect-get (prg) for a request that you
Is there any reason to use Dynamic Data Exchange (DDE) in a modern Windows
Possible Duplicate: Is there any reason to use the 'auto' keyword in C /

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.