The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
 All Forums
 Origin Forum for Programming
 LabTalk Forum
 Duplicate workbook takes ages to complete

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
Clairekun Posted - 08/11/2020 : 2:34:25 PM
Origin Ver. and Service Release (Select Help-->About Origin): 2018b
Operating System: Windows 10

Hello,

I have a set of workbooks I need to duplicate and rename. While
win -d Duplicate;
achieves it instantaneously for the selected workbook, assigning the name to a string makes the process much, much slower. I'm talking about 2-3 minutes per workbook, if I'm really lucky. I'm using
string sname$ = page.name$;
string TernSName$ = Substitute(sname$,t3,t1,1)$;
window -d %(TernSName$);


Since I need this to be run on multiple workbooks, it is taking painfully long; I have about 15 workbooks, and it needs over 30 minutes.

Is there any reasoning behind this, or any other faster way I could do it?

Each workbook has multiple worksheets, in case it is of any relevance.

Thank you.
2   L A T E S T    R E P L I E S    (Newest First)
lkb0221 Posted - 08/18/2020 : 09:04:43 AM
Those hidden loose datasets might be caused by one deleting his/her workbooks using window -c instead of -cd. Or created too many project-level variables during the script.
Clairekun Posted - 08/13/2020 : 1:44:33 PM
I found the problem.

I created a new project with similar features than the original one; multiple folders, multiple workbooks, multiple worksheets per workbook. Renaming did not take too long, so the code itself was not the problem.

I had imported multiple workbooks, with operations like merging and splitting workbooks. This left some residual data which was bloating the whole file. I did suspect this had something to do with the issue, but certainly not to this extent.

As soon as I ran
del -as
things went much, much faster. It went from over 4 hours (my prior estimation of about 30 minutes was very inaccurate) to a mere 2 minutes.

I included these leftovers removal in my importing code, and things were also much faster.

To anyone experiencing this issue, I recommend https://www.originlab.com/doc/Quick-Help/ProjectFile-Very-Slow.

Thank you!

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000