I have a button in a dialog that performs this callback, on-click:
(this is for testing purposes currently, have a hard coded path to the dll)
The above executes perfectly, and i'm doing cleanups by assigning null_values() (just to be sure resources are free at the end of the processing).
The task currently takes roughly 20mins to complete (with our test data). It takes a pdfs from a folder and outputs them to jpgs in another folder - the time taken will depend on how many pdfs our users have created for our publication which can vary between 200 and 600 files so roughly 10 to 30 minutes in any given week this task will need to be performed.
The code works perfectly for its purpose, so no problems there.
The thing i want to know is why this seizes up my session. I cannot continue to navigate the website. Or go back into Alpha Five and work on other things while this is happening. The website just gives me a loading cursor, and the Alpha Five application just freezes (not responding) until the task is complete.
But is there a way to run the code in this callback in the background so i can continue to administer the site?
Will this freeze up be affecting other users as well, or just my session on the website?
Would creating a new thread to run the processing in the assembly remedy this, or could i do it from Alpha?
Code:
function processTask as c (e as p) dim sv as DotNet::Services dim Alpha5Net4 as DotNet::AssemblyReference Alpha5Net4.FileName = "C:\Users\Administrator\Documents\Visual Studio 2010\Projects\IconLib2\IconLib2\bin\Release\IconLib2.dll" sv.RegisterClass("IconLib2","ImageFunctions","IconLib2.ImageFunctions",Alpha5Net4) sv.RegisterClass("IconLib2","WebsiteXML","IconLib2.WebsiteXML",Alpha5Net4) dim WebsiteXML as IconLib2::WebsiteXML dim ImageFunctions as IconLib2::ImageFunctions if e.dataSubmitted.radTasks = "1" then WebsiteXML.createWebsiteXML(e.dataSubmitted.txtIssueNo) ImageFunctions.processArtWorkForWeb(e.dataSubmitted.txtIssueNo) WebsiteXML = null_value() ImageFunctions = null_value() else ?"Task not available at this time" end if Alpha5Net4 = null_value() sv = null_value() dasa = "Finished" end function
The above executes perfectly, and i'm doing cleanups by assigning null_values() (just to be sure resources are free at the end of the processing).
The task currently takes roughly 20mins to complete (with our test data). It takes a pdfs from a folder and outputs them to jpgs in another folder - the time taken will depend on how many pdfs our users have created for our publication which can vary between 200 and 600 files so roughly 10 to 30 minutes in any given week this task will need to be performed.
The code works perfectly for its purpose, so no problems there.
The thing i want to know is why this seizes up my session. I cannot continue to navigate the website. Or go back into Alpha Five and work on other things while this is happening. The website just gives me a loading cursor, and the Alpha Five application just freezes (not responding) until the task is complete.
But is there a way to run the code in this callback in the background so i can continue to administer the site?
Will this freeze up be affecting other users as well, or just my session on the website?
Would creating a new thread to run the processing in the assembly remedy this, or could i do it from Alpha?
Comment