{"id":99,"date":"2007-02-02T20:11:30","date_gmt":"2007-02-02T19:11:30","guid":{"rendered":"http:\/\/blog.pczone.be\/?p=99"},"modified":"2007-03-14T14:32:16","modified_gmt":"2007-03-14T13:32:16","slug":"most-important-setting-when-using-dojo","status":"publish","type":"post","link":"https:\/\/blog.pczone.be\/?p=99","title":{"rendered":"Most important setting when using Dojo"},"content":{"rendered":"<p>In our current application we use dojo. Only for a small amount of the application at this moment, but for the new version we are planning to include a lot more functionality using the dojo toolkit. I was testing this on an older machine (p3 1Gig) and the application took really long to display the page. So I asked around on irc #dojo and they pointed me to this really nice setting:<\/p>\n<pre>\r\n&lt;script type=\"text\/javascript\">\r\n\tdjConfig = {\r\n\t\tparseWidgets: false\r\n\t};\r\n&lt;\/script>\r\n<\/pre>\n<p>Dojo waits until page has loaded and then starts scanning for the dojoType attributes, you can imagine if you have a lot of data this will take a while. With this simple setting you tell dojo <strong>don&#8217;t do this<\/strong>.<br \/>\nThen for every dojo widget you want to use, just add <\/p>\n<pre>\r\n&lt;script> dojo.hostenv.searchIds.push(id)&lt;\/script>\r\n<\/pre>\n<p>Dojo keeps all the ids and only tries to create a widget out of the ones you push out. So no page analysis afterwards.<\/p>\n<p><strong>Sweet 2<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In our current application we use dojo. Only for a small amount of the application at this moment, but for the new version we are planning to include a lot more functionality using the dojo toolkit. I was testing this on an older machine (p3 1Gig) and the application took really long to display the &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/blog.pczone.be\/?p=99\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Most important setting when using Dojo&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"enabled":false},"version":2}},"categories":[13,4,12],"tags":[],"class_list":["post-99","post","type-post","status-publish","format-standard","hentry","category-dojo","category-informatics","category-web"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p3U9nk-1B","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/blog.pczone.be\/index.php?rest_route=\/wp\/v2\/posts\/99","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.pczone.be\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.pczone.be\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.pczone.be\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.pczone.be\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=99"}],"version-history":[{"count":0,"href":"https:\/\/blog.pczone.be\/index.php?rest_route=\/wp\/v2\/posts\/99\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.pczone.be\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=99"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.pczone.be\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=99"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.pczone.be\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=99"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}