Jump to content

ShaunR

Members
  • Posts

    4,853
  • Joined

  • Days Won

    292

Posts posted by ShaunR

  1. My guess is that since each string includes a pointer there is an extra 4bytes for each string in 64bit, and since each string is rather short in this test, the extra 4 bytes makes a significant difference in the memory needs of the different platforms.

    That doesn't make a lot of sense to me. Surely pointers are just references to where the data is stored rather than being stored as part of the data.

    But I ran the tests again to make sure. This time inserting 500 chars rather than the <10 as before. Everything else is the same apart from taking an average of 5 to cut down the test time.

    Pretty much the same. There must be a difference between the memory managers and the way x64 manages allocation. Surprising really. I would expect LVx64 running on a x64 windows platform to outperform a x32 app.

  2. I'm not sure if I have time to help track down the issue. My first guess would be with memory allocation. Perhaps on the autoindexing on the while loop (if the allocation size is increased in limited sized chunks instead of exponential growth this could happen). Or maybe memory fragmentation (I'm not sure what algorithm LabVIEWs garbage collection uses, but I doubt it's compacting). The desktop trace tool can be used to check the while loop. Fragmentation would be harder to figure out.

    Definitely the former.

    If I pre-allocate the array and replace elements rather than auto index, then they perform exactly the same. But what I'm confused by is why there should be a difference between x32 and x64. After all, it should be the same amount of memory being (re)allocated and it is a LV internal implementation.

  3. crelf, I disagree with your statement. When I wire a variable to a Sub-VI, upon entry into the Sub-VI the placeholder control that was on the Sub-VI front panel assumes the value of the incoming wire. So if I wire a graph I expected EVERYTHING from the graph to be transferred as well. Now I know that only the DATA are passed to the Sub-VI. IMHO this breaks the concept of passing an object.

    I'm guessing you were a C++ programmer in an earlier life (I also suspect you haven't been using LV since 1998 as your profile suggests).

    Labview passes data. Not pointers, objects or lemons (unless you specifically tell it too and even then its just smoke and mirrors). All functions in LV are designed to operate on data. It is a data-centric,data-flow paradigm. Moreover it is a "strictly typed", data-centric, data-flow language. When you connect two VI's together, you are passing a value, not an object. When you use a reference, you are also passing a value, however, the property nodes know (by the type) that they need to "look up" and de-reference in order to obtain the data. They are,if you like, a "special" case of data rather than the "norm" and require special functions (property and method nodes) to operate on. If you were to inspect the value of a reference, you would find a a pointer sized Int. However, if you looked at the memory location you would not find your control or indicator or even its data..

  4. OK.

    I'm fairly happy with the performance of the API (there are to be a couple more minor tweaks but nothing drastic). So I started to look at SQLites performance. In particular I was interested in how SQLite copes with various numbers of records and whether there is deterioration in performance with increasing numbers of records. Wish I hadn't biggrin.gif

    Below is a graph of inserts and select queries for 1 to 1,000,000 records.

    The test machine is a Core 2 duo running Win 7 x64 using Labview 9 SP1 x32. Each data point is an average over 10 bulk inserts using the "Speed Example.vi". The database file was also deleted before each insert to ensure fragmentation and/or tree searching were not affecting the results.

    I think you can see that both inserts and select times are fairly linear in relation to the number. And (IMHO) 5 seconds to read or write a million records (consisting of 2 columns) is pretty nippy yes.gif

    Now the same machine (exactly the same test harness) but using LV2009 SP1 x64

    Hmmm.

    It's interesting to note. that up until about 100,000; x64 it performs similarly to x32. However, memory usage reported by the windows task manager above 200,000+ shows x64 starts to climb further. Typically by the end of the test x32 has consumed about 450MB whilst x64 is about 850MB when viewed in the windows task manager. Checking SQLites internal memory allocation using the "Memory.VI" yields an identical usage between both tests. However,. LV x64 seems to be using 2x windows memory. I'm tempted to hypothesise that it is memory allocation in LV x64 which is the cause.

    Can anyone else reproduce this result? A single check at (say) 500,000 should be sufficient.

  5. Hello,

    I could not find an answer to this (I tried a search).

    I have a main VI with an IntensityGraph with cursors. I want to read and change the positions of the cursors (among other things) in a Sub-VI. The reason for doing that is that the block diagram is already huge and very complicated, so I want to move some of the tasks to a Sub-VI.

    So I wire the IntensityGraph to one terminal of the Sub-VI connector. But when I read the cursor position with a Property Node inside the Sub-VI, I get the cursor positions of the "fake" IntensityGraph that I put in the FrontPanel of the Sub-VI, NOT the the cursor positions of the original graph in the main panel that I wired to the connector of the Su-VI.

    I hope I made myself clear.

    I am miffed by this behavior, which is not how all other "normal" variables behave when you pass them to a Sub-VI.

    My workaround now is to extract the cursors' positions in the main VI and pass those in a cluster to the Sub-VI.

    Is there a way to do it?

    Thanks.

    You need to pass the "reference" of the control to the sub VI. By wiring the graph control you are only passing the "data" that the graph contains,

  6. I'd offer you my tinfoil hat, but then I'd be exposed to the radiation falling from that missile launch on the west coast last week.

    http://www.metacafe.com/watch/1154898/how_to_make_a_tinfoil_hat/

    This one's for you guys (via Michael)

    <object width="480" height="385"><param name="movie" value="http://www.youtube.com/watch?v=7UAeSsvHhTg?fs=1&hl=en_US"><param'>http://www.youtube.com/watch?v=7UAeSsvHhTg?fs=1&hl=en_US"><param name="allowFullScreen" value="true"><param name="allowscriptaccess" value="always"><embed src="http://www.youtube.com/watch?v=7UAeSsvHhTg?fs=1&hl=en_US" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"></object>

    I wonder what colour the sky is on her planet rolleyes.gif

  7. Thanks for answering my question. I am lucky that the new version just got released. shifty.gif. Actually every time I will write data to a new file.

    Which function can I use to create a new file.

    You do not need to explicitly open or create a file with the any of the high level API (the exception being "Query by ref") as it will open or create a file if one doesn't exist. Just specify the fie name.

    Is there any difference between using SQLite as a database and writing to it and using it as a file format and storing data in it? Can the later be done by without using the SQL queries?

    I am completely new in this area. So please ignore if my questions sound foolish.

    Thanks,

    Subhasis

    You cannot write directly to the file using standard file write functions. A SQLite file has a complex structure.

  8. Hi it's me again...

    i was just wondering...

    how do i change the color of my tank in this .vi to red, instaed of black...????

    ...cuz' no matter where i search i can't find the specifications of a FillColor Property node, i mean... those numbers... what are they exactly??? are they RGB, are they hexadecimal stuff.... where i can find a table or someting like that with the numeric values to the colors...

    Thanks anyway...

    By the way... i use Labview 8.6..

    In the "Dialog & User interface" palette the is a "Colorbox constant". You can wire that to it and choose a colour by clicking on it which will show the colour chooser dialogue.

  9. There's probably a better mathematical solution, but this works as a practical approximation for this sort of thing (certainly for repeatability at least).

    As Yair said. Take loads of readings. Then calculate the mean and variance of your data.

    Plug those value into the probably density function for a truncated normal distribution and solve of X (note that b in this case is infinity).

    It is flawed in that it assumes your data is normally distributed (which it isn't its 1/2 of a normal distribution). But it will give a much better approximation.

    • Like 1
  10. At my company, we don't get administrative rights to our office computers (fortunately, this does not apply to our laboratory machines, YET). Anyway, when I install software on my office machine, I have to call IT, who can remotely log in to my computer and temporarily elevate my account to administrative rights so I can do my own installs. It used to be that they would elevate rights then leave you alone and trust you to reboot to return to standard user rights.

    But my last install, I was informed that they would have to stay remotely logged in to watch my actions to make sure I wasn't doing something bad. When I informed them that the NI installs take hours (4+ in the this case), there was dead silence on the other end. They very quickly developed a new procedure where they can grant exemptions to the new rule.

    Yup. I had a similar experience. At my old firm IT insisted that the had to install everything. I gave them a list of Labview and all the packages I needed and went and played with some instruments. After an hour they called me back to say it was complete. Great :) Where are the toolkits/packages? Umm. how do you install them (they said). So I showed them.

    After a few hours of sitting watching the install and drinking copious amounts of coffee the IT uy said "OK I'm off home". I said "When you come in tomorrow you need to phone NI and get all the activation codes (license was in ITs name). See you tomorrow so we can activate them all. Oh and by the way, we need to do this all again forl 8.2, 7.1 and 6.0 Can we do that the day after?"

    Next morning I had local admin rights and they transferred the license into my name biggrin.gif

  11. I have to do a complete uninstall and reinstall of my LV 2009 and DSC module. No problem. I'm surprised it's lasted this long without any corruption issues considering how hard I've been hammering it. :throwpc:

    I inherited this system and the guy who installed the software installed EVERYTHING. EVERYTHING. After selecting EVERYTHING NI in Add or Remove it told me I had 567 :o programs to uninstall. Now I'm on 17 of 567. I started almost an hour ago. A couple of questions:

    How long will this take? Do I need to go home and bring back a sleeping bag and an overnight bag?

    After this and msiblast is there anything else I need to do before I consider this time well spent and I can install a fresh copy of 2009?

    Thanks in advance.

    I hope your machine is networked to the internet. Mine isn't and after an install I have to hand type in 23 activation codes angry.gif It's all got a bit ridiculous sad.gif

  12. SQLite shows a download size of 4.8 MB. But the latest upload is only 1.8 MB. It looks like its the sum of all the versions.

    Is that right?

    The download page is geared towards showing information about a particular version (file name, version number, page title etc). Shouldn't it only show the size and download speed of the latest version?

  13. Hi,

    I have just started to use SQLite. I downloaded this toolkit and inserted data to a database using the insert function. But it seemed to be too slow. Is there any functionality in the toolkit, where i can do bulk insert into the db. I have never used any db before. So, I don t know about how fast it could be.

    My application requires me to write 500 rows and 5 columns of data into one table and about 5 rows and 2 columns into another table in less than 500 milliseconds. Can I do this using bulk insert. Or is there any other way to do this.

    Thanks in advance,

    Subhasis

    If you are using Version 1.1, then you can use the "Transaction Query.vi" as JCarmody referenced.

    If you are using version 1.2 (just uploaded so unlikely tongue.gif) then you can use the "Insert Table.vi" thumbup1.gif or "Transaction Query.vi".

    post-7834-0-81077400-1289912632_thumb.pn

    PLEASE at absolute bare minimal put an easy to find warning about how their data is not safe by default, unlike normal SQLite, and how to fix it.

    Well. I cannot replicate your test because you haven't released the VIs. But I ran the speed test inserting 1,000,000 rows with version 1.2 and reset the PC. After 12 resets the DB was fine although Labview forgot all its palette settings on the 3rd reset laugh.gif. At that point I got bored since it takes about 1 minute for my PC to boot ph34r.gif

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.