PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

optimizing GFCommon::replace_variable

  1. sboisvert@bryxal.ca
    Member

    If you have a look here:
    https://trello-attachments.s3.amazonaws.com/4f0680090bd2eb29720c5203/4f19acb1a63c9d76680115fe/15d8c3dfa13479c10918b94c80952280/upload_2012-08-29_at_3.23.54_pm.png

    You'll notice that in our setup the funtion GFCommon::replace_variable() is taking a lot of time. Over 2s total in a request. I'm sure there are many ways that you could optimize this and you guys would probably be much better at this than I am, but one simple thing we've done to help this is create an index on Lead_id and field_number. It seems to have helped us. Perhaps it would help others as well.

    Posted 12 years ago on Wednesday August 29, 2012 | Permalink
  2. What tool did you use to benchmark that?

    I will bring this to the attention of the developers. Thanks for posting this.

    Posted 12 years ago on Wednesday August 29, 2012 | Permalink
  3. sboisvert@bryxal.ca
    Member

    That was from New Relic transaction traces.

    Posted 12 years ago on Wednesday August 29, 2012 | Permalink
  4. sboisvert@bryxal.ca
    Member

    I believe its only a problem once you start getting in the 100 000+ form entries.

    Posted 12 years ago on Wednesday August 29, 2012 | Permalink
  5. That's a crazy amount of entries :-)

    Posted 12 years ago on Thursday August 30, 2012 | Permalink
  6. From the lead developer Alex Cancado:

    I have added that index to the lead detail table. If this comes up again I can take a deeper look and see if there is something else that can be done.

    Thanks for the suggestion.

    Posted 12 years ago on Thursday August 30, 2012 | Permalink

This topic has been resolved and has been closed to new replies.