LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LV slows down extremely when having large contents in clipboard

Hello everybody,
 
 
when opening Labview, selecting a inactive LV Windows (front panel, or diagram) i get very slow
reaction of labview (minutes) if my clipboard contains a lot of data.
Lot of data means for example a text of 18000 lines.
This occurs even if i dont paste the text to a string control in LV. Slowing down is when activating
a LV window eg. clicking the title bar.
 
This occurs with lv 7 and 8.
 
Best regards
 
Hacky 
 
 
0 Kudos
Message 1 of 23
(7,093 Views)

Have you profiled your memory useage, It is possibly a system resource problem and not necessarly a labview issue.  If you overuse memory (lots of applications or large files opened) you will exceed the Physical RAM limit and be forced into virtual memory mode (using the hard disk as a swap for RAM) this will show a very noticable slowdown of any system.  If it is a RAM issus adding memory is an easy and inexpensive fix (less than $100).  I would check this first,

Paul

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
Message 2 of 23
(7,084 Views)

Hello again,

i´ve tested this having Labview open and also Taskman viewing Memory usage. There is an increase of ~100 KByte.
Pasting the Data to Notpad works very quick.

 

Best Regards

Hacky

0 Kudos
Message 3 of 23
(7,079 Views)
Hacky,

the issue here is probably the fact that LabVIEW has its own clipboard and is not using the Windows clipboard directly. The standard Windows clipboard couldn't be used to copy e. g. parts of LabVIEW diagrams from one vi to another one as it would turn the LabVIEW code into bitmaps.
To be able to cpoy data from Windows to LabVIEW the two clipboards need to be synchronised and this might take some time - especially when there is not enough phyiscal memory available and Windows starts to use the swapfile on the harddrive.

You said that you don't see a significant increase in the memory usage but this is not necessarily very meaningful. You should also watch the swap file size and the harddrive activity.

Best regards,

Jochen Klier
National Instruments Germany

Message 4 of 23
(7,050 Views)


@Jochen wrote:
Hacky,

the issue here is probably the fact that LabVIEW has its own clipboard and is not using the Windows clipboard directly. The standard Windows clipboard couldn't be used to copy e. g. parts of LabVIEW diagrams from one vi to another one as it would turn the LabVIEW code into bitmaps.
To be able to cpoy data from Windows to LabVIEW the two clipboards need to be synchronised and this might take some time - especially when there is not enough phyiscal memory available and Windows starts to use the swapfile on the harddrive.

You said that you don't see a significant increase in the memory usage but this is not necessarily very meaningful. You should also watch the swap file size and the harddrive activity.

Best regards,

Jochen Klier
National Instruments Germany



While I understand that LabVIEW implements its own clipboard (in fact it creates a hidden window internally to act as its clipboard) and that this has quite some advantages as far as the multiplatform integration is concerned, it is not true that you couldn't actually use the Widnows clipboard for LabVIEW objects. The Windows clipboard allows to register private clipboard formats for use with private application data objects. This would however pose the challange of what to do when trying to import such a LabVIEW object placed into the clipboard by a different LabVIEW version.

Rolf Kalbermatter
Rolf Kalbermatter
My Blog
Message 5 of 23
(7,035 Views)

Hello everbody,

i checked the situtation as jochen told and found that swap memory increases first when i copy my text to clipboard and increases again when i only
activate a LV Vi. . So i assume that LV creates a local copy of the clipboard when LV gets the focus. Ofcourse this may take som time but i am not sure
if this is alway nessecary. I belive in most cases not.

So my question is, does LV need do copy the clipboard every time it gets the focus or can one handle this more elegant by copying the clipboard only
when a paste funtionality is called.

 

Best regards

Hacky

0 Kudos
Message 6 of 23
(7,027 Views)
The short answer is: No, there is currently no way to stop LabVIEW from synchronizing its clipboard to the Windows clipboard. So as a workaround you simply shouldn't place large amounts of data in the clipboard and switch to LabVIEW  when you don't intend to use it in LabVIEW.

The longer answer is that this issue was already brought to the attention of LabVIEW R&D just some weeks ago and they are currently looking into it. I'll add the URL of this thread to our Corrective Action Request database so potentially you will see a posting here when the issue is resolved.
Please don't expect that the behavior will be changed in a short term.

Best regards,

Jochen Klier
National Instruments Germany
Message 7 of 23
(7,021 Views)
Thank you for clearyfying this to me.
 
Best regards
Hartmut Jacobi
0 Kudos
Message 8 of 23
(7,016 Views)

Hi Jochen,

I appreciate you stepping forward and being upfront with us about what is happening here. Knowing wha the issue is, is half the battle.Smiley Happy

What is an effective technique for minimizing or clearing the clipboard so I could code around this issue?

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 9 of 23
(6,996 Views)
The only way to minimize the size of the clipboard that I know is to simply copy e. g. a small piece of text to it. If you do this before you switch to LabVIEW you won't run into this problem. This is the trivial solution and I think it's not really feasible as you would always have to keep in mind the potential amount of data that may reside in the clipboard...
The idea that is currently discussed in LabVIEW R&D is to change the LabVIEW clipboard to synchronize the data more in a "on demand" way or to give the user an option to change the synchronization behavior.

For now you will have to use the method described above or you will have to be patient if you switch to LabVIEW when there is lots of data in the clipboard. On the other hand I think this doesn't happen too frequently. In fact I have never come across this problem in my eight years of LabVIEW experience until I have read this thread.

Jochen
0 Kudos
Message 10 of 23
(6,984 Views)