{"id":22771,"date":"2023-06-01T11:26:02","date_gmt":"2023-06-01T09:26:02","guid":{"rendered":"https:\/\/www.marketinet.com\/blog\/development-in-salesforce-marketing-cloud-performance-analysis\/"},"modified":"2025-04-22T10:19:33","modified_gmt":"2025-04-22T08:19:33","slug":"development-in-salesforce-marketing-cloud-performance-analysis","status":"publish","type":"post","link":"https:\/\/www.marketinet.com\/en\/blog\/development-in-salesforce-marketing-cloud-performance-analysis\/","title":{"rendered":"Development in Salesforce Marketing Cloud: Ampscript or SSJS? &#8211; Part 3"},"content":{"rendered":"<p>As we have previously mentioned, in chapter 2 of the &#8220;Development in Salesforce Marketing Cloud&#8221; series, within the advantages and disadvantages of both languages is the issue of the performance of each one.<\/p>\n<p>\u00a0<\/p>\n<p><!--more--><\/p>\n<p><span data-ccp-props=\"{&quot;134233117&quot;:false,&quot;134233118&quot;:false,&quot;201341983&quot;:0,&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559685&quot;:0,&quot;335559737&quot;:0,&quot;335559738&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">If the difference were slight, it would be a negligible variable, unless the data handling is immense, both in the number of records and related tables that are used to personalize emails, cloud pages, etc.\u00a0<\/span><\/p>\n<p>\u00a0<\/p>\n<p><span data-ccp-props=\"{&quot;134233117&quot;:false,&quot;134233118&quot;:false,&quot;201341983&quot;:0,&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559685&quot;:0,&quot;335559737&quot;:0,&quot;335559738&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">Finally, we show you some numbers. These won&#8217;t matter if you use little data; because in many cases, and today when going to smaller niches, this amount of data is limited. But in some of our clients with huge amounts of data, it is a factor to take into account when both languages \u200b\u200bmeet the desired objective.<\/span><\/p>\n<p>\u00a0<\/p>\n<p>{{cta(&#8216;c533b742-eee9-41d5-87e1-81c9a5c7f393&#8242;,&#8217;justifycenter&#8217;)}}<\/p>\n<p><span data-ccp-props=\"{&quot;134233117&quot;:false,&quot;134233118&quot;:false,&quot;201341983&quot;:0,&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559685&quot;:0,&quot;335559737&quot;:0,&quot;335559738&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<h2>Should we use one language or another depending on its performance?<\/h2>\n<p>\u00a0<\/p>\n<p>As we will see, and given the performance differences between one and the other, the answer, if you use a lot of data, maybe YES.<\/p>\n<p>\u00a0<\/p>\n<p><span data-ccp-props=\"{&quot;134233117&quot;:false,&quot;134233118&quot;:false,&quot;201341983&quot;:0,&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559685&quot;:0,&quot;335559737&quot;:0,&quot;335559738&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">The test carried out is very basic but conclusive, we have used typical data tasks to analyze this performance.<\/span><\/p>\n<p>\u00a0<\/p>\n<ul>\n<li>\n<p>A loop with text printing on each iteration.<\/p>\n<\/li>\n<li data-leveltext=\"-\" data-font=\"Calibri\" data-listid=\"13\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559684&quot;:-2,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Calibri&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;-&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" aria-setsize=\"-1\" data-aria-posinset=\"1\" data-aria-level=\"1\">\n<p><span data-contrast=\"auto\">Just a loop, without printing data or doing any other operation.<\/span><\/p>\n<\/li>\n<li data-leveltext=\"-\" data-font=\"Calibri\" data-listid=\"13\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559684&quot;:-2,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Calibri&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;-&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" aria-setsize=\"-1\" data-aria-posinset=\"1\" data-aria-level=\"1\">\n<p><span data-ccp-props=\"{&quot;134233117&quot;:false,&quot;134233118&quot;:false,&quot;201341983&quot;:0,&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559737&quot;:0,&quot;335559738&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">A data retrieval from a Data Extension and its printing in a table (50 rows).<\/span><\/p>\n<\/li>\n<li data-leveltext=\"-\" data-font=\"Calibri\" data-listid=\"13\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559684&quot;:-2,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Calibri&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;-&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" aria-setsize=\"-1\" data-aria-posinset=\"2\" data-aria-level=\"1\">\n<p><span data-ccp-props=\"{&quot;134233117&quot;:false,&quot;134233118&quot;:false,&quot;201341983&quot;:0,&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559737&quot;:0,&quot;335559738&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">A loop with a GET call to a page (5 requests).<\/span><\/p>\n<\/li>\n<li data-leveltext=\"-\" data-font=\"Calibri\" data-listid=\"13\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559684&quot;:-2,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Calibri&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;-&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" aria-setsize=\"-1\" data-aria-posinset=\"4\" data-aria-level=\"1\">\n<p><span data-ccp-props=\"{&quot;134233117&quot;:false,&quot;134233118&quot;:false,&quot;201341983&quot;:0,&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559737&quot;:0,&quot;335559738&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">And a test of doing 500 inserts in a Data Extension with 6 fields.<\/span><\/p>\n<\/li>\n<\/ul>\n<p><span data-ccp-props=\"{&quot;134233117&quot;:false,&quot;134233118&quot;:false,&quot;201341983&quot;:0,&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559737&quot;:0,&quot;335559738&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<p><span data-ccp-props=\"{&quot;134233117&quot;:false,&quot;134233118&quot;:false,&quot;201341983&quot;:0,&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559737&quot;:0,&quot;335559738&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">The results are very striking: the difference is very big in some tasks, mostly to the detriment of SSJS (bad news for those of us who prefer this language) and curiously the biggest difference is an elementary loop to print a text; but in the rest, there are also differences, it only wins if it is a loop without text, something that is not very common either (the truth is).<\/span><\/p>\n<p>\u00a0<\/p>\n<p><span data-ccp-props=\"{&quot;134233117&quot;:false,&quot;134233118&quot;:false,&quot;201341983&quot;:0,&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559737&quot;:0,&quot;335559738&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">Here is the table of results:<\/span><\/p>\n<div><span data-ccp-props=\"{&quot;134233117&quot;:false,&quot;134233118&quot;:false,&quot;201341983&quot;:0,&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559737&quot;:0,&quot;335559738&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/div>\n<div><span data-ccp-props=\"{&quot;134233117&quot;:false,&quot;134233118&quot;:false,&quot;201341983&quot;:0,&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559737&quot;:0,&quot;335559738&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/div>\n<table width=\"803\">\n<tbody>\n<tr>\n<td colspan=\"4\"><strong>\u00a0COMPARISON OF EXECUTION TIME IN SECONDS: AMPSCRIPT VERSUS SSJS<\/strong><\/td>\n<\/tr>\n<tr>\n<td><strong>Script type<\/strong><\/td>\n<td><strong>Ampscript<\/strong><\/td>\n<td><strong>SSJS<\/strong><\/td>\n<td>\n<pre id=\"tw-target-text\" dir=\"ltr\" data-placeholder=\"Traducci\u00f3n\"><strong><span lang=\"en\">Differential <\/span><\/strong><strong>(%)<\/strong><\/pre>\n<\/td>\n<\/tr>\n<tr>\n<td>Printing in a loop of 5000 iterations of a String<\/td>\n<td>0,016<\/td>\n<td>0,708<\/td>\n<td>4325%<\/td>\n<\/tr>\n<tr>\n<td>20000 iteration loop without printing<\/td>\n<td>0,06<\/td>\n<td>0,032<\/td>\n<td>-47%<\/td>\n<\/tr>\n<tr>\n<td>Lookup and printing of 50 rows of a Data Extension<\/td>\n<td>0,016<\/td>\n<td>0,422<\/td>\n<td>2538%<\/td>\n<\/tr>\n<tr>\n<td>HTTP get to a URL in a loop 5 calls<\/td>\n<td>0,158<\/td>\n<td>0,219<\/td>\n<td>39%<\/td>\n<\/tr>\n<tr>\n<td>500 data inserts in a DE<\/td>\n<td>0,783<\/td>\n<td>0,9496<\/td>\n<td>21%<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u00a0<\/p>\n<p>And here is a table, representing the greater or lesser slowness of one language versus the other.<\/p>\n<p>\u00a0<\/p>\n<p><img decoding=\"async\" data-src=\"https:\/\/www.marketinet.com\/wp-content\/uploads\/2024\/06\/articulos\/salesforce-marketing-cloud\/rendimiento-ampscript-versus-ssjs-marketing-cloud.png\" alt=\"Performance between Ampscript vs SSJS\" width=\"642\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" class=\"lazyload\" style=\"--smush-placeholder-width: 642px; --smush-placeholder-aspect-ratio: 642\/637;\" \/><\/p>\n<p>\u00a0<\/p>\n<p>We hope these data give you some light. They have helped us decide in each development because we prioritized SSJS more than we should and now we will take AMPSCRIPT more into account in certain jobs.<\/p>\n<p>\u00a0<\/p>\n<p>\u00a0<\/p>\n<p><strong>If you liked this article, you may also be interested in: <\/strong><\/p>\n<p>\u00a0<\/p>\n<ul>\n<li>\n<p><span id=\"hs_cos_wrapper_post_body\" data-hs-cos-general-type=\"meta_field\" data-hs-cos-type=\"rich_text\"><a href=\"https:\/\/www.marketinet.com\/en\/thedigitalmarketinglab\/development-in-salesforce-marketing-cloud-introduction\" target=\"_blank\" rel=\"noopener\">Development in Salesforce Marketing Cloud: Ampscript or SSJS? &#8211; Introduction (Part 1)<\/a><\/span><\/p>\n<\/li>\n<li>\n<p><span id=\"hs_cos_wrapper_post_body\" data-hs-cos-general-type=\"meta_field\" data-hs-cos-type=\"rich_text\"><a href=\"https:\/\/www.marketinet.com\/en\/thedigitalmarketinglab\/development-in-salesforce-marketing-cloud-comparison\" target=\"_blank\" rel=\"noopener\">Development in Salesforce Marketing Cloud: Ampscript or SSJS? &#8211; Comparison (Part 2) <\/a><\/span><\/p>\n<\/li>\n<li>\n<p><a href=\"\/en\/thedigitalmarketinglab\/main-advantages-of-segmentation-in-salesforce-marketing-cloud\" target=\"_blank\" rel=\"noopener\">Main advantages of segmentation in Salesforce Marketing Cloud<\/a><\/p>\n<\/li>\n<\/ul>\n<hr \/>\n<p>\u00a0<\/p>\n<p>{{cta(&#8217;52fa9c99-860e-4fbd-b8e0-8084060f20e8&#8242;,&#8217;justifycenter&#8217;)}}<\/p>\n<p>\u00a0<\/p>\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/www.marketinet.com\/ebooks\/ampscript-for-marketers?utm_source=blog&amp;utm_medium=inbound&amp;utm_campaign=cta_recurso_blog_ebook_ampscript_for_marketers\"><img decoding=\"async\" width=\"600\" height=\"147\" data-src=\"https:\/\/www.marketinet.com\/wp-content\/uploads\/2023\/06\/Captura7-2.png\" alt=\"\" class=\"wp-image-27833 lazyload\" data-srcset=\"https:\/\/www.marketinet.com\/wp-content\/uploads\/2023\/06\/Captura7-2.png 600w, https:\/\/www.marketinet.com\/wp-content\/uploads\/2023\/06\/Captura7-2-480x118.png 480w\" data-sizes=\"(min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) 600px, 100vw\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 600px; --smush-placeholder-aspect-ratio: 600\/147;\" \/><\/a><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>As we have previously mentioned, in chapter 2 of the &#8220;Development in Salesforce Marketing Cloud&#8221; series, within the advantages and disadvantages of both languages is the issue of the performance of each one. \u00a0<\/p>\n","protected":false},"author":36,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_et_pb_use_builder":"","_et_pb_old_content":"","_et_gb_content_width":"","footnotes":""},"categories":[1],"tags":[165],"class_list":["post-22771","post","type-post","status-publish","format-standard","hentry","category-sin-categorizar","tag-sf-marketing-cloud"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.marketinet.com\/en\/wp-json\/wp\/v2\/posts\/22771","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.marketinet.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.marketinet.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.marketinet.com\/en\/wp-json\/wp\/v2\/users\/36"}],"replies":[{"embeddable":true,"href":"https:\/\/www.marketinet.com\/en\/wp-json\/wp\/v2\/comments?post=22771"}],"version-history":[{"count":0,"href":"https:\/\/www.marketinet.com\/en\/wp-json\/wp\/v2\/posts\/22771\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.marketinet.com\/en\/wp-json\/wp\/v2\/media?parent=22771"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.marketinet.com\/en\/wp-json\/wp\/v2\/categories?post=22771"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.marketinet.com\/en\/wp-json\/wp\/v2\/tags?post=22771"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}