Re: [Dxfreader-info] DXFReader with delegates?
Status: Beta
Brought to you by:
allandaly
|
From: Allan D. <al...@br...> - 2009-02-28 16:22:17
|
Interesting idea. I'll have to think about this one. Off the bat it seems to me that because the DXF file structure is a very straightforward "flat file" approach that that creating a reader that could start to operate on one part of the file before the whole file is completed processing could cause problems. At the same time there is tons of data inside the DXF that most programs have no use for so as you say this might speed things up. So far I have not found the DXF reading process to be very slow -- even with pretty large architectural floorplan files. So far it appears that the process of creating the DK objects on the drawing layers is what is slow and needs to be sped up. If you try to open the floorplan.dxf example file in the DKSimpleDXF app you'll see what I mean. I'm certainly open to this idea and if you want to explore it further I think that would be great. -Allan On Feb 28, 2009, at 7:37 AM, Michael Caron wrote: > Hey list, > > thought it might be cool to add delegates to the DXFReader Model > class. I think that if one wanted to add multi-threading to the > loader, it would be easier that way. The reader could continue > reading, calling delegates as it hits things like entities, header > sections, etc. If the delegate chose to, it could kick off a thread > to do it's processing on that element. The element would still be > added to the model for later if so desired, but the processor would > have a chance to create, say a DK drawing layer and render the > element on it, while the reader is busy reading. I don't know if it > would be all that much of a performance gain though and I'd probably > want to do some profiling before adding it in there, but it's an idea. > > It's kind of a cross between what a SAX and DOM parser is to XML. > One is streaming using callbacks, and the other is model-based. Best > of both worlds. > > Michael > ------------------------------------------------ > mic...@gm... > http://techrad.wordpress.com > http://mrcaron.wordpress.com > > ------------------------------------------------------------------------------ > Open Source Business Conference (OSBC), March 24-25, 2009, San > Francisco, CA > -OSBC tackles the biggest issue in open source: Open Sourcing the > Enterprise > -Strategies to boost innovation and cut costs with open source > participation > -Receive a $600 discount off the registration fee with the source > code: SFAD > http://p.sf.net/sfu/XcvMzF8H_______________________________________________ > Dxfreader-info mailing list > Dxf...@li... > https://lists.sourceforge.net/lists/listinfo/dxfreader-info |