Jump to content

vs.BuildResourceListN2() and vs.CopySymbol() extremely show in VW24


Recommended Posts

so I'm coming from VW22 and updating my plugins for VW24... part of the script imports some symbols from an external .vwx file (the file is almost 1GB in size). when I run the plugin in VW24 both vs.BuildResourceListN2() and vs.CopySymbol() takes several seconds vs VW22 did it instantly. 

 

here's the code I've tried to use:

 

vs.CopySymbol(os.path.join(vs.GetFolderPath(23) , symbol_file), cursym)

 

fixute_file = os.path.join(vs.GetFolderPath(23) , cable_file)
symbolslist, nums = vs.BuildResourceListN2(16, fixute_file, False)

for i in range(nums):
  name = vs.GetNameFromResourceList(symbolslist, i+1)
  if name == cursym:
    vs.ImportResToCurFileN(symbolslist, i+1, importcall)

 

I'm not really sure what else to try at this point to speed up the process. I also won't be able to make the external file any smaller. it's filled with symbols we use all the time. 

Link to comment

Hello @Jayme McColgan,

   First question, did you convert your reference file to VW 2024 format? I would expect this to give you the best chance for success.

 

   If you have converted it and your code still runs slowly, I would copy some symbols into a much smaller temporary file and try your code again. If it's still slow, then it's not the reference file's size. Perhaps it's a drive, or network problem. Try copying the file to your computer and try again. Does it run faster when the file is local? 

 

   If pulling symbols from a much smaller file speeds things up significantly, then I would find a way to partition your non-partitionable file into two or more smaller files. Split it alphabetically and you can easily code your symbol calls to address the correct source file using the symbol's name to determine the source file.

 

   Of course there are many ways to approach the overall problem. I hope you find one that works well for you.

 

Raymond

Link to comment

 

2 hours ago, MullinRJ said:

did you convert your reference file to VW 2024 format

yes it was converted for VW2024

 

2 hours ago, MullinRJ said:

then I would find a way to partition your non-partitionable file into two or more smaller files

this is what I'm trying to avoid but it might come to this. 

 

2 hours ago, MullinRJ said:

Try copying the file to your computer and try again. Does it run faster when the file is local?

This file is local. it lives in the user favorites folder. 

 

copying some of the symbols to a smaller file fixes it so I'm assuming that's the issue. 

 

i talked with some of the devs at VW last week while I was there and i was told that vs.CopySymbol() now has to open the file to copy things but building a resource list should be must faster. it doesn't seem to be the case... 

Link to comment

Hi Jayme,

   It may not be the answer you wanted, but it sounds like you are on the right path.

 

   Another thing to evaluate, how fast does CopySymbol() work if your reference file is open all the time? I don't know what your system configuration is, but consider opening the reference file when you launch VW and leave it open for the drafting session. If it works, and your system doesn't slow down, it may keep you from splitting the symbol file right now. Just a thought.

 

All the best,

Raymond

Link to comment

sadly it's not feasible to ask the users I'm building these plugins for to do that... 

 

for now, I've started a new file for symbols that my plugins would be pulling in and left all the other random symbols in the other file. I don't think it's the final fix but it's a good bandaid so I can get users up and running on VW24.

 

at this point, I'm more curious about what changed from VW22 to VW24 that is causing this. I try to reserve contacting the VW devs but I'm starting to get to that point. lol

 

but to your original question @MullinRJ yes if I have the remote file open it's wicked fast. so it obviously has something to do with opening the file. 

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...