Author Topic: read-line and data storage?  (Read 10480 times)

0 Members and 1 Guest are viewing this topic.

daron

  • Guest
read-line and data storage?
« Reply #15 on: February 11, 2004, 09:59:42 AM »
Now the test would be to see how it reads an xml file.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
read-line and data storage?
« Reply #16 on: February 11, 2004, 11:12:52 AM »
Stig,
Kills me when i see it takes me almost a day to write a routine &
looks like you whip it out in minutes. :shock:

The time element seems like a non issue given the small amount
of data to be retrieved. And the readability of single line data
items is appealing to me. I think i'll keep the phraser for
another project.

Stig, I may have to barrow your sub routines. 8)

i see you were able to compress the phraser sub even more. That must
come from knowing the commands inside out. I hope to get there.

Quote from: Daron
Now the test would be to see how it reads an xml file.


Did you volunteer? :)

Seems like, after reading the post on XML, the only real advantage is
being able to share the data with other apps. Although that can be a
huge advantage if that feature is needed. Is that assumption correct?

CAB
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

daron

  • Guest
read-line and data storage?
« Reply #17 on: February 11, 2004, 11:16:15 AM »
I think you are correct, but at the moment I can't do the xml. Ask Stig for some examples of xml with lisp.

SMadsen

  • Guest
read-line and data storage?
« Reply #18 on: February 11, 2004, 11:19:02 AM »
Quote from: daron
Now the test would be to see how it reads an xml file.

Ummm ...

Timed readXML: 23.202007 !!

for 100 runs of:
Code: [Select]
(defun readXML (name / xmlTest fnode)
  (cond ((setq name (findfile name))
         (setq xmlTest (XML-create))
         (cond ((XML-load xmlTest name)
                (if (= (type (setq fnode (XML-getFirstNode xmlTest)))
                       'VLA-OBJECT
                    )
                  (setq mainList (cdr (XML-traverse fnode)))
                )
               )
         )
         (vl-catch-all-apply 'vlax-release-object (list xmlTest))
        )
  )
  mainList
)

(defun doXML ()
  (startTimer)
  (repeat 100
    (readXML "readxml.xml")
  )
  (endTimer "readXML")
)



XML file used:
Code: [Select]
<?xml version="1.0" standalone="yes"?>
<Common>
 <Header>
  <data>Foundation</data>
  <data>0</data>
  <data>nil</data>
  <data>0</data>
  <data>HelpFoundation.sld</data>
 </Header>
 <Text>
  <data>F16</data>
  <data>2</data>
  <line>16" x 8" FOOTING</line>
  <line>W/ (2) #5 REBAR</line>
  <line>ON WIRE CHAIRS</line>
 </Text>
 <Text>
  <data>F20</data>
  <data>2</data>
  <line>20" x 10" FOOTING</line>
  <line>W/ (3) #5 REBAR</line>
  <line>ON WIRE CHAIRS</line>
 </Text>
 <Text>
  <data>F24</data>
  <data>2</data>
  <line>24" x 12" FOOTING</line>
  <line>W/ (3) #5 REBAR</line>
  <line>ON WIRE CHAIRS</line>
 </Text>
 <Text>
  <data>P30</data>
  <data>2</data>
  <line>30" X 30" X 12" DEEP</line>
  <line>CONC. FOOTING PAD</line>
  <line>W/ (3) #5~ E.W. (TYP.)</line>
 </Text>
 <Text>
  <data>P36</data>
  <data>2</data>
  <line>36" X 36" X 12" DEEP</line>
  <line>CONC. FOOTING PAD</line>
  <line>W/ (3) #5~ E.W. (TYP.)</line>
 </Text>
 <Text>
  <data>P48</data>
  <data>2</data>
  <line>48" X 48" X 12" DEEP</line>
  <line>CONC. FOOTING PAD</line>
  <line>W/ (5) #5~ E.W. (TYP.)</line>
 </Text>
 <Text>
  <data>P60</data>
  <data>2</data>
  <line>60" X 60" X 12" DEEP</line>
  <line>CONC. FOOTING PAD"</line>
  <line>W/ (6) #5~ E.W. (TYP.)</line>
 </Text>
 <Text>
  <data>BW</data>
  <data>2</data>
  <line>12"Dx16"W w/2-#5 BARS CONT.</line>
  <line>1/2"~ A.B. @ 48" O.C. TYP</line>
 </Text>
 <Text>
  <data>FS</data>
  <data>0</data>
  <line>A FOUNDATION SURVEY SHALL BE PERFORMED</line>
  <line>AND A COPY OF THE SURVEY SHALL BE ON THE</line>
  <line>SITE FOR THE BUILDING INSPECTOR'S USE, OR</line>
  <line>ALL PROPERTY MARKERS SHALL BE EXPOSED AND</line>
  <line>A STRING STRECHED FROM MARKER TO MARKER</line>
  <line>TO VERIFY REQUIRED SETBACKS.</line>
 </Text>
 <Text>
  <data>SLB</data>
  <data>0</data>
  <line>4" 2500 PSI CONCRETE SLAB W/6X6</line>
  <line>#1010 WWM OR W/ FIBERMESH 1.5#/CU.YD.</line>
  <line>OVER .006 POLY VAPOR BARRIER SEALED</line>
  <line>AT ALL PENETRATIONS MECHANICALLY</line>
  <line>COMPACT SOIL TERMITE TREAT SOIL</line>
 </Text>
</Common>

SMadsen

  • Guest
read-line and data storage?
« Reply #19 on: February 11, 2004, 11:23:41 AM »
Quote from: CAB
Stig, I may have to barrow your sub routines. 8)

Borrow, take, alter, rewrite, use all you want, please.

daron

  • Guest
read-line and data storage?
« Reply #20 on: February 11, 2004, 11:32:02 AM »
Thanks Stig. That takes forever.

SMadsen

  • Guest
read-line and data storage?
« Reply #21 on: February 11, 2004, 11:42:48 AM »
Your welcome, Daron. A single call returns some 0.26. It must be all the object creation and releasing stuff that takes time.
As CAB mentions, usually it's not really important how long it takes - unless the task is to open several files and put things together or something. I was just wondering if reading lines in a text file really was slow, 'cos I never knew that.

daron

  • Guest
read-line and data storage?
« Reply #22 on: February 11, 2004, 12:16:39 PM »
Actually, any time someone brings up the time it takes to do something, I get involved. We have some company wide standards that need to be updated desparately, that slow the startup process of every drawing. I'm hoping to get transferred to our corporate office to do programming. Ever since we had those tests on layer creation, I've been trying to make sure anything I do doesn't slow anybody down.

SMadsen

  • Guest
read-line and data storage?
« Reply #23 on: February 11, 2004, 12:39:07 PM »
As long as the thread has been mutated already ...  :)

I can see that during startup it could have some effect on everyday use. Escpecially if the startup is executing alot of stuff instead of just loading it.

During normal use I would prioritize error handling unconditionally more so than speed, though.

daron

  • Guest
read-line and data storage?
« Reply #24 on: February 11, 2004, 12:57:38 PM »
Not a total mutation. At least the topic has some relevance. And yes, the startup is executing tons of stuff as well as updating the company logo block by inserting and erasing each piece of it and then destroying any last saved view by zooming to extents. It's awful.