Bill Tillman Posted July 10, 2013 Posted July 10, 2013 In the projects I'm working on for a client, I use VB.NET to populate an Excel file, then read some data from it which is saved in a text file. The VB.NET program then unleashes AutoCAD and a LISP program which reads this text file and prepares a drawing. The IT manager here says that he wants me to cease and desist from programming in VB anything. Stating security risks, etc... Ok cool, so I went back to what I was originally doing using GetExcel module strictly using LISP. What I found is that it can work that way but it seems rather slow. I tested some stuff with it today and found that not only is it slower, but once I populate the cells on Sheet1 of the file, it has to be saved so that it can be reopened in order to pull values which were calculated on Sheet2 of the file. What I also discovered is that just getting the steps of inputting the data, reading the calculations then setting up to prepare the drawing take as much time as the VB.NET method takes to be completely done, and that includes sending a web stream back over the Internet to let the user know their drawing is ready. VLISP seems like a nice tool for this but is it always going to be this slow? And with VB.NET there is no need to save, close and then reopen the Excel file. I can do everything in one instance of Excel including reading data from multiple sheets. Quote
BlackBox Posted July 10, 2013 Posted July 10, 2013 Yes... Unfortunately, LISP (ActiveX COM) is exponentially slower than managed code (.NET API). I cannot find the graphic that illustrated the difference between each API, I want to say it's part of an AU developer course I took, and simply don't recall which (of the 200+ AU courses I've taken). In any event, you're seemingly relegated to one of a select few of options... Management can eat the performance hit by doing pure Visual LISP using native ActiveX COM APIs with external Objects You can convince them to allow managed code (i.e., VB, C#, F#, etc., which has presumably failed already or you wouldn't be posting this). You can code yourself custom LispFunction Method(s) which expose only the managed API features you need for your work, and NETLOAD the resultant assembly at session start, thus using only LISP per IT, yet gaining a great deal of performance via your custom LispFunction Method(s). Quote
Recommended Posts
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.