3

I'm loading a ssis package from my application which works fine. However, what I'm trying to work out and failing miserably is that the package executes in 1 second (which is great) but the loading of the package takes 9 seconds.

Working locally in visual studio 2015 connecting remotely to a SQL Server 2014 instance.

The package is being loaded in a business object behind an async web api call from a console application.

Heres the code (standard stuff)...

Application application = new Application();
DTSExecResult result;
DTSPackageEventListener eventListener = new DTSPackageEventListener();

packageLocation = request.packageLocation;

//using (Package package = application.LoadPackage(packageLocation, eventListener)) // 9 seconds to load
using (Package package = application.LoadFromDtsServer(@"File System\<PACKAGENAME>", @"<SERVERNAME>", eventListener)) // 9 seconds to load
{
.
.
.

Does anyone have any tips? Any help/guidance would be much appreciated.

Simon.

Hadi
  • 36,233
  • 13
  • 65
  • 124
S Osborn
  • 87
  • 1
  • 5
  • What is the question/problem? This seems normal. You can run the package from SSISDB directly if you don't want to load it. – Jacob H Jun 05 '17 at 16:26
  • Hi Jacob, the problem was the latency in loading the package. I'm essentially writing a proof of concept project to see if using a SSIS package is quick enough to service adhoc user requests from our web application. I'll try calling directly from SSISDB to see if that helps but think I may have already tried that. – S Osborn Jun 06 '17 at 08:13
  • Hi Jacob, that worked a treat. Sub second load. much appreciated. – S Osborn Jun 06 '17 at 10:13
  • Great! Glad I could help. I the more I use the SSISDB, the more I like it. – Jacob H Jun 06 '17 at 12:35

1 Answers1

0

This is normal, dtsx file is an xml file and the DtsRuntime library need to deserialize the file to load it as dot net class. Also there are some validation that are done on package loading.

Hadi
  • 36,233
  • 13
  • 65
  • 124