{"id":1330,"date":"2011-07-09T21:17:59","date_gmt":"2011-07-09T20:17:59","guid":{"rendered":"http:\/\/positech.co.uk\/cliffsblog\/?p=1330"},"modified":"2011-07-09T21:17:59","modified_gmt":"2011-07-09T20:17:59","slug":"handy-optimising-tip","status":"publish","type":"post","link":"https:\/\/www.positech.co.uk\/cliffsblog\/2011\/07\/09\/handy-optimising-tip\/","title":{"rendered":"Handy optimising tip"},"content":{"rendered":"<p>If you have a profiler like aqtime that can be remotely enabled and disabled try this.<\/p>\n<ol>\n<li>Have a flag that is &#8216;bprofileframe&#8217; and set it to false by default<\/li>\n<li>Bind a keystroke to a function that toggles the flag on<\/li>\n<li>In your render loop, before rendering, if the flag is true, enable debugging<\/li>\n<li>At the end of the render loop, if the flag is true, set false, and disable debugging.<\/li>\n<\/ol>\n<p>Voila! you have a keystroke that will capture a single frames profiling data and ONLY that frame, making for really easy profiling on very specific situations. Works a treat. Now I just need to work out how to make it all faster :D<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you have a profiler like aqtime that can be remotely enabled and disabled try this. Have a flag that is &#8216;bprofileframe&#8217; and set it to false by default Bind a keystroke to a function that toggles the flag on In your render loop, before rendering, if the flag is true, enable debugging At the<\/p>\n<p class=\"text-right\"><span class=\"screen-reader-text\">Continue Reading&#8230; Handy optimising tip<\/span><a class=\"btn btn-secondary continue-reading\" href=\"https:\/\/www.positech.co.uk\/cliffsblog\/2011\/07\/09\/handy-optimising-tip\/\">Continue Reading&#8230;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-1330","post","type-post","status-publish","format-standard","hentry","category-programming"],"_links":{"self":[{"href":"https:\/\/www.positech.co.uk\/cliffsblog\/wp-json\/wp\/v2\/posts\/1330","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.positech.co.uk\/cliffsblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.positech.co.uk\/cliffsblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.positech.co.uk\/cliffsblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.positech.co.uk\/cliffsblog\/wp-json\/wp\/v2\/comments?post=1330"}],"version-history":[{"count":1,"href":"https:\/\/www.positech.co.uk\/cliffsblog\/wp-json\/wp\/v2\/posts\/1330\/revisions"}],"predecessor-version":[{"id":1331,"href":"https:\/\/www.positech.co.uk\/cliffsblog\/wp-json\/wp\/v2\/posts\/1330\/revisions\/1331"}],"wp:attachment":[{"href":"https:\/\/www.positech.co.uk\/cliffsblog\/wp-json\/wp\/v2\/media?parent=1330"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.positech.co.uk\/cliffsblog\/wp-json\/wp\/v2\/categories?post=1330"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.positech.co.uk\/cliffsblog\/wp-json\/wp\/v2\/tags?post=1330"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}