<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Data-driven content's job taking many seconds to run in SAS Visual Analytics</title>
    <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Data-driven-content-s-job-taking-many-seconds-to-run/m-p/988937#M18984</link>
    <description>&lt;P&gt;Hi again &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;BR /&gt;to make sure I understand you correctly, what exactly takes 15 seconds?&lt;BR /&gt;The code snippet you posted? I see you run a&amp;nbsp;&lt;/P&gt;
&lt;PRE class="language-sas"&gt;&lt;CODE&gt;caslib _all_ assign;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;that can take a while. If you assign the libnames you actually require later explicitly anyways (libname xyz cas...) then you can probably just omit the _all_ assign.&lt;/P&gt;
&lt;P&gt;If it takes 15 seconds before your code first starts running I suppose the main delay is the kubernetes pod start up time. In that case you might be able to make use of the compute tasks method introduces last year:&amp;nbsp;&lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/Speeding-Up-SAS-Viya-Jobs-with-Compute-Tasks/ta-p/979307" target="_blank"&gt;Speeding Up SAS Viya Jobs with Compute Tasks&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;If I recall correctly with the same update also session support was introduced to the Job Execution web app, I never played around with those though so my experience is a bit limited:&amp;nbsp;&lt;A href="https://go.documentation.sas.com/doc/en/jobexeccdc/v_004/jobexecug/p1blidtp348ikbn1dmjip4se83ur.htm" target="_blank"&gt;SAS Help Center: Using Sessions&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 01 Jun 2026 12:18:46 GMT</pubDate>
    <dc:creator>pathew</dc:creator>
    <dc:date>2026-06-01T12:18:46Z</dc:date>
    <item>
      <title>Data-driven content's job taking many seconds to run</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Data-driven-content-s-job-taking-many-seconds-to-run/m-p/988867#M18982</link>
      <description>&lt;P&gt;We have an user interface through DDC in Visual Analytics that captures the user's choice into parameters, processes them, adds logic and sends them via the append method to the sas code job.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The code executes well but overall the job takes 15 seconds to complete.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have the suspicion that what consumes so much time is to lift the session and assign the caslibs, I assign all of them but I only need 2 for the code to run. The sas code once the session is created, takes less than a second to run as it is not resource heaevy what the code is doing.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can I use the autoexec file for keeping the session alive,&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/461890"&gt;@pathew&lt;/a&gt;&amp;nbsp;? I ask you directly because you solved a similar issue this week for me. Thanks in advance.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is how the called sas code for execution initiates the session right now, the relevant part:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%put NOTE: Local   = %sysfunc(putn(&amp;amp;dt_local, datetime20.));
%put NOTE: UTC= %sysfunc(putn(&amp;amp;dt,       datetime20.));

/* %let local_vs_utc=%sysfunc(intck('dthours', &amp;amp;dt_local, &amp;amp;dt)); */
%let user_q    = %str(%')&amp;amp;SYSUSERID%str(%'); 
%let uuid_q    = %str(%')&amp;amp;row_id%str(%'); 
%let castbl=OUTPUT_EQUIPMENT_SRT_DEN;
%let caslib=pims;  

%global skip_job lockstate;
%let skip_job=0;        /* IMPORTANT: init so open-code %if is stable */
%let lockstate=ACCESSIBLE;

cas mySession sessopts=(caslib=casuser timeout=1800 locale="en_US");

caslib _all_ assign;


cas mySession sessopts=(caslib="&amp;amp;caslib");
libname mycas cas caslib="&amp;amp;caslib";&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="pic.png" style="width: 721px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/115437iEDA29C033DC60379/image-size/large?v=v2&amp;amp;px=999" role="button" title="pic.png" alt="pic.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 29 May 2026 12:25:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Data-driven-content-s-job-taking-many-seconds-to-run/m-p/988867#M18982</guid>
      <dc:creator>acordes</dc:creator>
      <dc:date>2026-05-29T12:25:32Z</dc:date>
    </item>
    <item>
      <title>Re: Data-driven content's job taking many seconds to run</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Data-driven-content-s-job-taking-many-seconds-to-run/m-p/988937#M18984</link>
      <description>&lt;P&gt;Hi again &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;BR /&gt;to make sure I understand you correctly, what exactly takes 15 seconds?&lt;BR /&gt;The code snippet you posted? I see you run a&amp;nbsp;&lt;/P&gt;
&lt;PRE class="language-sas"&gt;&lt;CODE&gt;caslib _all_ assign;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;that can take a while. If you assign the libnames you actually require later explicitly anyways (libname xyz cas...) then you can probably just omit the _all_ assign.&lt;/P&gt;
&lt;P&gt;If it takes 15 seconds before your code first starts running I suppose the main delay is the kubernetes pod start up time. In that case you might be able to make use of the compute tasks method introduces last year:&amp;nbsp;&lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/Speeding-Up-SAS-Viya-Jobs-with-Compute-Tasks/ta-p/979307" target="_blank"&gt;Speeding Up SAS Viya Jobs with Compute Tasks&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;If I recall correctly with the same update also session support was introduced to the Job Execution web app, I never played around with those though so my experience is a bit limited:&amp;nbsp;&lt;A href="https://go.documentation.sas.com/doc/en/jobexeccdc/v_004/jobexecug/p1blidtp348ikbn1dmjip4se83ur.htm" target="_blank"&gt;SAS Help Center: Using Sessions&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jun 2026 12:18:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Data-driven-content-s-job-taking-many-seconds-to-run/m-p/988937#M18984</guid>
      <dc:creator>pathew</dc:creator>
      <dc:date>2026-06-01T12:18:46Z</dc:date>
    </item>
  </channel>
</rss>

