When does FAS or VLX become faster

Discussion in 'AutoCAD' started by Gordon Price, Oct 7, 2004.

  1. Gordon Price

    Gordon Price Guest

    I have been using the VLsip IDE for LSP files for a while now. Never really
    found a need to compile. So I am wondering, is there a size or complexity of
    code that results in a FAS or VLX being noticably faster? I like the idea of
    combining all my LSP files into one VLX, and the security of the code would
    be nice when selling a product, but as an in-house developer, when does FAS
    or VLX become useful from a speed standpoint?

    Best,
    Gordon
     
    Gordon Price, Oct 7, 2004
    #1
  2. Gordon Price

    Tom Smith Guest

    Gordon, FWIW, I compile lisps primarily for security, so that they don't
    escape the office by "sneaker net." I use a trick or two in each compiled
    file to prevent them from working (or even loading) in an unauthorized
    environment. Execution speed hasn't been an issue with me, and I don't see a
    noticeable difference in speed for the modest size lisps I produce.

    As far as compiling everything into a single VLX, I didn't go that route
    simply because the source file would have been unweildy to maintain and slow
    to load. By experimentation I found that on our (slow) machines a VLX of
    about 30 or 40KB loaded near-instantly. So my many smallish lisps are
    compiled into separate VLX's of about that size, and autoloaded on startup
    via (autoload "lisp1.vlx" '("this" "that" "theother" ...)). Keeping the
    VLX's down in size means the user doesn't even notice their loading when the
    autoload is first triggered. I keep the source code in like-named folders so
    this isn't hard to maintain. Lisps that are larger than about 5 or 10KB
    apiece I compile individually and autoload accordingly.

    Note that you have to load a revised ai_ffile (cribbed from acad2004doc.lsp)
    to allow autoloading FAS and VLX files.
     
    Tom Smith, Oct 7, 2004
    #2
  3. Gordon Price

    3ABTPA Guest

    French revolution happened not because someone wake-up one day and deside to
    make the revolution...
     
    3ABTPA, Oct 7, 2004
    #3
  4. Gordon Price

    j.buzbee Guest

    exactly

     
    j.buzbee, Oct 7, 2004
    #4
  5. Gordon Price

    Reini Urban Guest

    Before there was a large difference, because the compiler was optional.
    Now it is mandatory. Now .LSP are compiled on-the-fly on loading.

    So you have:
    ..LSP: load (+read), compile, eval
    ..FAS: load (+decrypt), eval

    The small differences you may notice is the compiler step, which is a
    very simple conservative compiler step without any optimizations.
    read is quite fast, decrypt much faster than read.

    A highly optimized FAS/VLX (VLX just adds namespace support, and
    optionally other ressources to be linked into), will load and run much
    faster, because the file buffer is much smaller, the code is optimized,
    the data is stripped ("drop") from local-only symbols.

    For larger projects of mine I'll notice the difference.
    But FileIO is most of the time spended.
    If you concat all files to one big mess, and/or compile this (the same
    effect) it get's very fast in loading. Faster than any optimization,
    which you will mostly notice at run-time.
     
    Reini Urban, Oct 7, 2004
    #5
  6. Gordon Price

    John Uhden Guest

    Haven't really tested, but my perception is that it really hasn't mattered much
    [about speed] since the advent of R15. To me, a separate namespace VLX allows
    me to expose only those functions that the document namespace needs to run them,
    which in most cases people limit to C: functions. The benefit of a separate
    namespace to both the user and the provider is the prevention of over-defining
    function names. Autodesk has an interoperability registration "clearing house"
    set up but my guess is that there's no real way to enforce the use of unique
    function names. F'rinstance, would anyone bother to check if they defined a
    document namespace function called "@cv_whatever?" I think I have that prefix
    registered, but there ain't no CIA agent keeping you from using the same name.
    Whichever C:TEST function is loaded last wins, ya know?
     
    John Uhden, Oct 8, 2004
    #6
  7. The other thing is that you can combine multiple lisps into one vlx.
    That way I can include my libraries of functions without much fuss.
    I update the libraries and each prog gets the changes for next compile.

    "Gordon Price" <gordon(thorn)@albedoconsulting.com>
    |>I have been using the VLsip IDE for LSP files for a while now. Never really
    |>found a need to compile. So I am wondering, is there a size or complexity of
    |>code that results in a FAS or VLX being noticably faster? I like the idea of
    |>combining all my LSP files into one VLX, and the security of the code would
    |>be nice when selling a product, but as an in-house developer, when does FAS
    |>or VLX become useful from a speed standpoint?
    |>
    |>Best,
    |>Gordon
    |>

    James Maeding
    jmaeding at hunsaker dot com
    Civil Engineer/Programmer
     
    James Maeding, Oct 12, 2004
    #7
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.