{"id":10,"date":"2008-02-10T14:43:11","date_gmt":"2008-02-10T14:43:11","guid":{"rendered":"http:\/\/psyphi.net\/blog\/?p=10"},"modified":"2010-01-24T14:53:54","modified_gmt":"2010-01-24T14:53:54","slug":"the-importance-of-profiling","status":"publish","type":"post","link":"https:\/\/psyphi.net\/blog\/2008\/02\/the-importance-of-profiling\/","title":{"rendered":"The Importance of Profiling"},"content":{"rendered":"<p>I&#8217;ve worked as a software developer and worked with teams of software developers for around 10 years now, Many of those whom I&#8217;ve worked with have earned my trust and respect in relation to development and testing techniques. Frustratingly however it&#8217;s still with irritating regularity that I hear throw-away comments bourne of uncertainty and ignorance.<\/p>\n<p>A couple of times now I&#8217;ve specifically been told that &#8220;GD makes my code go slow&#8221;. Now for those of you not in the know GD (actually specifically Lincoln Stein&#8217;s GD.pm in perl) is a wrapper around Tom Boutell&#8217;s most marvellous <a title=\"LibGD\" href=\"http:\/\/libgd.org\">libgd<\/a> graphics library. The combination of these two has always performed excellently for me and never been the bottleneck in any of my applications. The applications in question are usually database-backed web applications with graphics components for plotting genomic features or charts of one sort or another.<\/p>\n<p>As any database-application developer will tell you, the database, or network connection to the database is almost always the bottleneck in an application or service. Great efforts are made to ensure database services scale well and perform as efficiently as possible, but even after these improvements are made they usually simply delay the inevitable.<\/p>\n<p>Hence my frustration when I hear that &#8220;GD is making my (database) application go slow&#8221;. How? Where? Why? Where&#8217;s the proof? It&#8217;s no use blaming something, a library in this case, that&#8217;s out of your control. It&#8217;s hard to believe a claim like that without some sort of measurement.<\/p>\n<p>So.. before pointing the finger, profile the code and make an effort to understand what the profiler is doing. In database applications profile your queries &#8211; use EXPLAIN, add indices, record SQL transcripts and time the results. Then profile the code which is manipulating those results.<\/p>\n<p>Once the results are in of course, concentrate in the first instance on the parts with the most impact (e.g. 0.1 second off each iteration of a 1000x loop rather than 1 second from \/int main\/ ) &#8211; the low hanging fruit. Good programmers should be relatively lazy and speeding up code with the least amount of effort should be commonsense.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve worked as a software developer and worked with teams of software developers for around 10 years now, Many of those whom I&#8217;ve worked with have earned my trust and respect in relation to development and testing techniques. Frustratingly however it&#8217;s still with irritating regularity that I hear throw-away comments bourne of uncertainty and ignorance. &hellip; <a href=\"https:\/\/psyphi.net\/blog\/2008\/02\/the-importance-of-profiling\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;The Importance of Profiling&#8221;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"footnotes":""},"categories":[11],"tags":[12,10,1081],"class_list":["post-10","post","type-post","status-publish","format-standard","hentry","category-programming","tag-libgd","tag-profiling","tag-programming"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.0.1 - aioseo.com -->\n\t<meta name=\"description\" content=\"I&#039;ve worked as a software developer and worked with teams of software developers for around 10 years now, Many of those whom I&#039;ve worked with have earned my trust and respect in relation to development and testing techniques. Frustratingly however it&#039;s still with irritating regularity that I hear throw-away comments bourne of uncertainty and ignorance.\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Roger Pettett\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/psyphi.net\/blog\/2008\/02\/the-importance-of-profiling\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.0.1\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"psyphi.net blog - Another collection of braingunk and technolint\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"The Importance of Profiling - psyphi.net blog\" \/>\n\t\t<meta property=\"og:description\" content=\"I&#039;ve worked as a software developer and worked with teams of software developers for around 10 years now, Many of those whom I&#039;ve worked with have earned my trust and respect in relation to development and testing techniques. Frustratingly however it&#039;s still with irritating regularity that I hear throw-away comments bourne of uncertainty and ignorance.\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/psyphi.net\/blog\/2008\/02\/the-importance-of-profiling\/\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2008-02-10T14:43:11+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2010-01-24T14:53:54+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n\t\t<meta name=\"twitter:title\" content=\"The Importance of Profiling - psyphi.net blog\" \/>\n\t\t<meta name=\"twitter:description\" content=\"I&#039;ve worked as a software developer and worked with teams of software developers for around 10 years now, Many of those whom I&#039;ve worked with have earned my trust and respect in relation to development and testing techniques. Frustratingly however it&#039;s still with irritating regularity that I hear throw-away comments bourne of uncertainty and ignorance.\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"BlogPosting\",\"@id\":\"https:\\\/\\\/psyphi.net\\\/blog\\\/2008\\\/02\\\/the-importance-of-profiling\\\/#blogposting\",\"name\":\"The Importance of Profiling - psyphi.net blog\",\"headline\":\"The Importance of Profiling\",\"author\":{\"@id\":\"https:\\\/\\\/psyphi.net\\\/blog\\\/author\\\/rmp\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/psyphi.net\\\/blog\\\/#organization\"},\"datePublished\":\"2008-02-10T14:43:11+00:00\",\"dateModified\":\"2010-01-24T14:53:54+00:00\",\"inLanguage\":\"en-US\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/psyphi.net\\\/blog\\\/2008\\\/02\\\/the-importance-of-profiling\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/psyphi.net\\\/blog\\\/2008\\\/02\\\/the-importance-of-profiling\\\/#webpage\"},\"articleSection\":\"programming, libgd, profiling, programming\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/psyphi.net\\\/blog\\\/2008\\\/02\\\/the-importance-of-profiling\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/psyphi.net\\\/blog#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/psyphi.net\\\/blog\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/psyphi.net\\\/blog\\\/category\\\/programming\\\/#listItem\",\"name\":\"programming\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/psyphi.net\\\/blog\\\/category\\\/programming\\\/#listItem\",\"position\":2,\"name\":\"programming\",\"item\":\"https:\\\/\\\/psyphi.net\\\/blog\\\/category\\\/programming\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/psyphi.net\\\/blog\\\/2008\\\/02\\\/the-importance-of-profiling\\\/#listItem\",\"name\":\"The Importance of Profiling\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/psyphi.net\\\/blog#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/psyphi.net\\\/blog\\\/2008\\\/02\\\/the-importance-of-profiling\\\/#listItem\",\"position\":3,\"name\":\"The Importance of Profiling\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/psyphi.net\\\/blog\\\/category\\\/programming\\\/#listItem\",\"name\":\"programming\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/psyphi.net\\\/blog\\\/#organization\",\"name\":\"psyphi.net blog\",\"description\":\"Another collection of braingunk and technolint\",\"url\":\"https:\\\/\\\/psyphi.net\\\/blog\\\/\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/psyphi.net\\\/blog\\\/author\\\/rmp\\\/#author\",\"url\":\"https:\\\/\\\/psyphi.net\\\/blog\\\/author\\\/rmp\\\/\",\"name\":\"Roger Pettett\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/psyphi.net\\\/blog\\\/2008\\\/02\\\/the-importance-of-profiling\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f715f8335258578c567eb8c22335f1cee22c971c2aff8be27c4d8d934c436503?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Roger Pettett\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/psyphi.net\\\/blog\\\/2008\\\/02\\\/the-importance-of-profiling\\\/#webpage\",\"url\":\"https:\\\/\\\/psyphi.net\\\/blog\\\/2008\\\/02\\\/the-importance-of-profiling\\\/\",\"name\":\"The Importance of Profiling - psyphi.net blog\",\"description\":\"I've worked as a software developer and worked with teams of software developers for around 10 years now, Many of those whom I've worked with have earned my trust and respect in relation to development and testing techniques. Frustratingly however it's still with irritating regularity that I hear throw-away comments bourne of uncertainty and ignorance.\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/psyphi.net\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/psyphi.net\\\/blog\\\/2008\\\/02\\\/the-importance-of-profiling\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/psyphi.net\\\/blog\\\/author\\\/rmp\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/psyphi.net\\\/blog\\\/author\\\/rmp\\\/#author\"},\"datePublished\":\"2008-02-10T14:43:11+00:00\",\"dateModified\":\"2010-01-24T14:53:54+00:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/psyphi.net\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/psyphi.net\\\/blog\\\/\",\"name\":\"psyphi.net blog\",\"description\":\"Another collection of braingunk and technolint\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/psyphi.net\\\/blog\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"The Importance of Profiling - psyphi.net blog","description":"I've worked as a software developer and worked with teams of software developers for around 10 years now, Many of those whom I've worked with have earned my trust and respect in relation to development and testing techniques. Frustratingly however it's still with irritating regularity that I hear throw-away comments bourne of uncertainty and ignorance.","canonical_url":"https:\/\/psyphi.net\/blog\/2008\/02\/the-importance-of-profiling\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"BlogPosting","@id":"https:\/\/psyphi.net\/blog\/2008\/02\/the-importance-of-profiling\/#blogposting","name":"The Importance of Profiling - psyphi.net blog","headline":"The Importance of Profiling","author":{"@id":"https:\/\/psyphi.net\/blog\/author\/rmp\/#author"},"publisher":{"@id":"https:\/\/psyphi.net\/blog\/#organization"},"datePublished":"2008-02-10T14:43:11+00:00","dateModified":"2010-01-24T14:53:54+00:00","inLanguage":"en-US","mainEntityOfPage":{"@id":"https:\/\/psyphi.net\/blog\/2008\/02\/the-importance-of-profiling\/#webpage"},"isPartOf":{"@id":"https:\/\/psyphi.net\/blog\/2008\/02\/the-importance-of-profiling\/#webpage"},"articleSection":"programming, libgd, profiling, programming"},{"@type":"BreadcrumbList","@id":"https:\/\/psyphi.net\/blog\/2008\/02\/the-importance-of-profiling\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/psyphi.net\/blog#listItem","position":1,"name":"Home","item":"https:\/\/psyphi.net\/blog","nextItem":{"@type":"ListItem","@id":"https:\/\/psyphi.net\/blog\/category\/programming\/#listItem","name":"programming"}},{"@type":"ListItem","@id":"https:\/\/psyphi.net\/blog\/category\/programming\/#listItem","position":2,"name":"programming","item":"https:\/\/psyphi.net\/blog\/category\/programming\/","nextItem":{"@type":"ListItem","@id":"https:\/\/psyphi.net\/blog\/2008\/02\/the-importance-of-profiling\/#listItem","name":"The Importance of Profiling"},"previousItem":{"@type":"ListItem","@id":"https:\/\/psyphi.net\/blog#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/psyphi.net\/blog\/2008\/02\/the-importance-of-profiling\/#listItem","position":3,"name":"The Importance of Profiling","previousItem":{"@type":"ListItem","@id":"https:\/\/psyphi.net\/blog\/category\/programming\/#listItem","name":"programming"}}]},{"@type":"Organization","@id":"https:\/\/psyphi.net\/blog\/#organization","name":"psyphi.net blog","description":"Another collection of braingunk and technolint","url":"https:\/\/psyphi.net\/blog\/"},{"@type":"Person","@id":"https:\/\/psyphi.net\/blog\/author\/rmp\/#author","url":"https:\/\/psyphi.net\/blog\/author\/rmp\/","name":"Roger Pettett","image":{"@type":"ImageObject","@id":"https:\/\/psyphi.net\/blog\/2008\/02\/the-importance-of-profiling\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/f715f8335258578c567eb8c22335f1cee22c971c2aff8be27c4d8d934c436503?s=96&d=mm&r=g","width":96,"height":96,"caption":"Roger Pettett"}},{"@type":"WebPage","@id":"https:\/\/psyphi.net\/blog\/2008\/02\/the-importance-of-profiling\/#webpage","url":"https:\/\/psyphi.net\/blog\/2008\/02\/the-importance-of-profiling\/","name":"The Importance of Profiling - psyphi.net blog","description":"I've worked as a software developer and worked with teams of software developers for around 10 years now, Many of those whom I've worked with have earned my trust and respect in relation to development and testing techniques. Frustratingly however it's still with irritating regularity that I hear throw-away comments bourne of uncertainty and ignorance.","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/psyphi.net\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/psyphi.net\/blog\/2008\/02\/the-importance-of-profiling\/#breadcrumblist"},"author":{"@id":"https:\/\/psyphi.net\/blog\/author\/rmp\/#author"},"creator":{"@id":"https:\/\/psyphi.net\/blog\/author\/rmp\/#author"},"datePublished":"2008-02-10T14:43:11+00:00","dateModified":"2010-01-24T14:53:54+00:00"},{"@type":"WebSite","@id":"https:\/\/psyphi.net\/blog\/#website","url":"https:\/\/psyphi.net\/blog\/","name":"psyphi.net blog","description":"Another collection of braingunk and technolint","inLanguage":"en-US","publisher":{"@id":"https:\/\/psyphi.net\/blog\/#organization"}}]},"og:locale":"en_US","og:site_name":"psyphi.net blog - Another collection of braingunk and technolint","og:type":"article","og:title":"The Importance of Profiling - psyphi.net blog","og:description":"I've worked as a software developer and worked with teams of software developers for around 10 years now, Many of those whom I've worked with have earned my trust and respect in relation to development and testing techniques. Frustratingly however it's still with irritating regularity that I hear throw-away comments bourne of uncertainty and ignorance.","og:url":"https:\/\/psyphi.net\/blog\/2008\/02\/the-importance-of-profiling\/","article:published_time":"2008-02-10T14:43:11+00:00","article:modified_time":"2010-01-24T14:53:54+00:00","twitter:card":"summary_large_image","twitter:title":"The Importance of Profiling - psyphi.net blog","twitter:description":"I've worked as a software developer and worked with teams of software developers for around 10 years now, Many of those whom I've worked with have earned my trust and respect in relation to development and testing techniques. Frustratingly however it's still with irritating regularity that I hear throw-away comments bourne of uncertainty and ignorance."},"aioseo_meta_data":{"post_id":"10","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"ai":null,"created":"2024-05-16 12:32:10","updated":"2025-08-15 17:21:43","focus_keyword":null,"additional_keywords":null,"truseo_locale":null,"seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/psyphi.net\/blog\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/psyphi.net\/blog\/category\/programming\/\" title=\"programming\">programming<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tThe Importance of Profiling\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/psyphi.net\/blog"},{"label":"programming","link":"https:\/\/psyphi.net\/blog\/category\/programming\/"},{"label":"The Importance of Profiling","link":"https:\/\/psyphi.net\/blog\/2008\/02\/the-importance-of-profiling\/"}],"_links":{"self":[{"href":"https:\/\/psyphi.net\/blog\/wp-json\/wp\/v2\/posts\/10","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/psyphi.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/psyphi.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/psyphi.net\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/psyphi.net\/blog\/wp-json\/wp\/v2\/comments?post=10"}],"version-history":[{"count":3,"href":"https:\/\/psyphi.net\/blog\/wp-json\/wp\/v2\/posts\/10\/revisions"}],"predecessor-version":[{"id":12,"href":"https:\/\/psyphi.net\/blog\/wp-json\/wp\/v2\/posts\/10\/revisions\/12"}],"wp:attachment":[{"href":"https:\/\/psyphi.net\/blog\/wp-json\/wp\/v2\/media?parent=10"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/psyphi.net\/blog\/wp-json\/wp\/v2\/categories?post=10"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/psyphi.net\/blog\/wp-json\/wp\/v2\/tags?post=10"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}