LDraw.org Discussion Forums
inliner - new version 2.3.0.0 - Printable Version

+- LDraw.org Discussion Forums (https://forums.ldraw.org)
+-- Forum: LDraw Programs (https://forums.ldraw.org/forum-7.html)
+--- Forum: All Other Programs. (https://forums.ldraw.org/forum-26.html)
+--- Thread: inliner - new version 2.3.0.0 (/thread-22772.html)



inliner - new version 2.3.0.0 - Michael Heidemann - 2018-03-23

I just uploaded a new build of the old commandline tool inliner to my webspace.

I hope all the bad experiences in the past are now gone Smile .

You can download it from ldraw.heidemann.org

Please leave your comments for other users and me here.

have fun
cu
mikeheide


RE: inliner - new version 2.3.0.0 - Michael Horvath - 2018-03-23

(2018-03-23, 19:31)Michael Heidemann Wrote: I just uploaded a new build of the old commandline tool inliner to my webspace.

I hope all the bad experiences in the past are now gone Smile .

You can download it from ldraw.heidemann.org

Please leave your comments for other users and me here.

have fun
cu
mikeheide

Is this meant for primitives inside parts, or can it be used for sub-models as well?


RE: inliner - new version 2.3.0.0 - Michael Horvath - 2018-08-22

(2018-03-23, 19:31)Michael Heidemann Wrote: I just uploaded a new build of the old commandline tool inliner to my webspace.

I hope all the bad experiences in the past are now gone Smile .

You can download it from ldraw.heidemann.org

Please leave your comments for other users and me here.

have fun
cu
mikeheide

I get an "Unhandled Exception: OutOfMemoryException" message when I try to inline the attached file.


RE: inliner - new version 2.3.0.0 - Michael Horvath - 2018-08-23

I get an "Unhandled Exception: Cannot print exception string because Exception.ToString() failed" message when I try to inline the attached file.


RE: inliner - new version 2.3.0.0 - Michael Heidemann - 2018-09-22

(2018-08-23, 17:06)Michael Horvath Wrote: I get an "Unhandled Exception: Cannot print exception string because Exception.ToString() failed" message when I try to inline the attached file.

I just did the inlining with DATHeader MPDCenter 2.4.1 and it works perfect, please see attached file.

Please let me know the command line you used to produce the error you mentioned. I am asking this because both - Inliner and DATHeader MPDCenter - shares the same code for the inlining itself.

I am looking forward to hearing from you.

cu
Mikeheide


RE: inliner - new version 2.3.0.0 - Michael Heidemann - 2018-09-22

(2018-08-22, 20:16)Michael Horvath Wrote:
(2018-03-23, 19:31)Michael Heidemann Wrote: I just uploaded a new build of the old commandline tool inliner to my webspace.

I hope all the bad experiences in the past are now gone Smile .

You can download it from ldraw.heidemann.org

Please leave your comments for other users and me here.

have fun
cu
mikeheide

I get an "Unhandled Exception: OutOfMemoryException" message when I try to inline the attached file.

Hi Michael,
I just inlined this file with MPDCenter and it works perfect. Please see attached file.

Because MPDCenter and Inliner shares the code for inlining, please let me know the line you called with inliner exactly.

I am looking forward to your further information.

cu
Mikeheide

PS: Why do you use not MPDCenter?


RE: inliner - new version 2.3.0.0 - Michael Heidemann - 2018-09-22

(2018-09-22, 6:42)Michael Heidemann Wrote:
(2018-08-23, 17:06)Michael Horvath Wrote: I get an "Unhandled Exception: Cannot print exception string because Exception.ToString() failed" message when I try to inline the attached file.

I just did the inlining with DATHeader MPDCenter 2.4.1 and it works perfect, please see attached file.

Please let me know the command line you used to produce the error you mentioned. I am asking this because both - Inliner and DATHeader MPDCenter - shares the same code for the inlining itself.

I am looking forward to hearing from you.

cu
Mikeheide
Now i see the problem. In case we inline down to eliminate linetype 1 the file size will grow very huge.
The function I use in the code can not handle such large files at once.
I have to spilt the file internally, so I the code can handle it.
I think this may take some days, because this function is used at many places and I have to find out how to solve this with as low line changes as possible.

I keep you informed.
cu
Mikeheide


RE: inliner - new version 2.3.0.0 - Michael Heidemann - 2018-09-22

(2018-09-22, 6:48)Michael Heidemann Wrote:
(2018-08-22, 20:16)Michael Horvath Wrote: I get an "Unhandled Exception: OutOfMemoryException" message when I try to inline the attached file.

Hi Michael,
I just inlined this file with MPDCenter and it works perfect. Please see attached file.

Because MPDCenter and Inliner shares the code for inlining, please let me know the line you called with inliner exactly.

I am looking forward to your further information.

cu
Mikeheide

PS: Why do you use not MPDCenter?
Now i see the problem. In case we inline down to eliminate linetype 1 the file size will grow very huge.
The function I use in the code can not handle such large files at once.
I have to spilt the file internally, so I the code can handle it.
I think this may take some days, because this function is used at many places and I have to find out how to solve this with as low line changes as possible.

I keep you informed.
cu
Mikeheide


RE: inliner - new version 2.3.0.0 - Michael Horvath - 2018-09-22

(2018-09-22, 10:35)Michael Heidemann Wrote:
(2018-09-22, 6:48)Michael Heidemann Wrote: Hi Michael,
I just inlined this file with MPDCenter and it works perfect. Please see attached file.

Because MPDCenter and Inliner shares the code for inlining, please let me know the line you called with inliner exactly.

I am looking forward to your further information.

cu
Mikeheide

PS: Why do you use not MPDCenter?
Now i see the problem. In case we inline down to eliminate linetype 1 the file size will grow very huge.
The function I use in the code can not handle such large files at once.
I have to spilt the file internally, so I the code can handle it.
I think this may take some days, because this function is used at many places and I have to find out how to solve this with as low line changes as possible.

I keep you informed.
cu
Mikeheide

Thanks for taking a look.

Smile


RE: inliner - new version 2.3.0.0 - Michael Heidemann - 2018-09-23

(2018-09-22, 14:44)Michael Horvath Wrote:
(2018-09-22, 10:35)Michael Heidemann Wrote: Now i see the problem. In case we inline down to eliminate linetype 1 the file size will grow very huge.
The function I use in the code can not handle such large files at once.
I have to spilt the file internally, so I the code can handle it.
I think this may take some days, because this function is used at many places and I have to find out how to solve this with as low line changes as possible.

I keep you informed.
cu
Mikeheide

Thanks for taking a look.

Smile
This is not done in a quick time. I saw that I made heavy use of memory, to avoid error that i encountered in the past (references an object as original but is had been changed).
This will lead to a rewrite of some code an much, much testing.

I'll keep you informed.

cu
Mikeheide


RE: inliner - new version 2.3.0.0 - Michael Heidemann - 2018-09-29

(2018-09-22, 14:44)Michael Horvath Wrote:
(2018-09-22, 10:35)Michael Heidemann Wrote: Now i see the problem. In case we inline down to eliminate linetype 1 the file size will grow very huge.
The function I use in the code can not handle such large files at once.
I have to spilt the file internally, so I the code can handle it.
I think this may take some days, because this function is used at many places and I have to find out how to solve this with as low line changes as possible.

I keep you informed.
cu
Mikeheide

Thanks for taking a look.

Smile
I have managed MPDCenter to inline the file down to only numbers (no linetype1). The usage of memory has been up to 2 GB and the resulting file is now 57MB. I had to eliminate all linetype0 lines to finish the work without getting the 'out of memory' error. It seems that the code does waste the memory.
Is the output without any comment lines usable for you? (Sadfully I could not load the file here in the forum, because it is too large, so I uploaded another file that is much smaller.)


RE: inliner - new version 2.3.0.0 - Michael Heidemann - 2018-09-30

(2018-09-29, 8:35)Michael Heidemann Wrote:
(2018-09-22, 14:44)Michael Horvath Wrote: Thanks for taking a look.

Smile
I have managed MPDCenter to inline the file down to only numbers (no linetype1). The usage of memory has been up to 2 GB and the resulting file is now 57MB. I had to eliminate all linetype0 lines to finish the work without getting the 'out of memory' error. It seems that the code does waste the memory.
Is the output without any comment lines usable for you? (Sadfully I could not load the file here in the forum, because it is too large, so I uploaded another file that is much smaller.)

Memory usage is now ok. But some other issues occur. So thank you very much for your patience, but at the end I think we have a good product. Wink


RE: inliner - new version 2.3.0.0 - Michael Heidemann - 2018-09-30

(2018-09-30, 9:37)Michael Heidemann Wrote:
(2018-09-29, 8:35)Michael Heidemann Wrote: I have managed MPDCenter to inline the file down to only numbers (no linetype1). The usage of memory has been up to 2 GB and the resulting file is now 57MB. I had to eliminate all linetype0 lines to finish the work without getting the 'out of memory' error. It seems that the code does waste the memory.
Is the output without any comment lines usable for you? (Sadfully I could not load the file here in the forum, because it is too large, so I uploaded another file that is much smaller.)

Memory usage is now ok. But some other issues occur. So thank you very much for your patience, but at the end I think we have a good product. Wink

If all works on the last test with a model (4MB size) without an memory error I think my work is done and I will release the next version of MPDCenter. If also Inliner will be updated I am going to decide later. Undecided
stay interested


RE: inliner - new version 2.3.0.0 - Roland Melkert - 2018-09-30

(2018-09-30, 20:04)Michael Heidemann Wrote:
(2018-09-30, 9:37)Michael Heidemann Wrote: Memory usage is now ok. But some other issues occur. So thank you very much for your patience, but at the end I think we have a good product. Wink

If all works on the last test with a model (4MB size) without an memory error I think my work is done and I will release the next version of MPDCenter. If also Inliner will be updated I am going to decide later. Undecided
stay interested

I'm curious how do you manage to 'waste' 2GB of memory for such a relatively simple operation?

Are you resizing a lot of (huge) dynamic arrays or something?

If so you might want to switch to pointer arrays to prevent heap fragmentation.


RE: inliner - new version 2.3.0.0 - Michael Heidemann - 2018-10-01

(2018-09-30, 21:16)Roland Melkert Wrote:
(2018-09-30, 20:04)Michael Heidemann Wrote: If all works on the last test with a model (4MB size) without an memory error I think my work is done and I will release the next version of MPDCenter. If also Inliner will be updated I am going to decide later. Undecided
stay interested

I'm curious how do you manage to 'waste' 2GB of memory for such a relatively simple operation?

Are you resizing a lot of (huge) dynamic arrays or something?

If so you might want to switch to pointer arrays to prevent heap fragmentation.

Hi Roland, thanks for your tips. As I am coding in Visual Basic NET I do not really know what you are talking about. I think my approach is completely different from anybody else. I handle each file and each line and each element in a line as an object. This has many advantages but surely also some disadvantages. To waste memory is easy. Just create each time a new object. Then at one point you are out of memory :-)
I have now managed it differently and I have already inlined a 4 MB mpd file model into a 970 MB ldr file without any reference to the library. And I got no error :-)
Sadly I could not load this ldr file into LDView to see the result. But small files are very much ok.

Inliner 2.4.0 is now out - please share your experience.

cu
Mikeheide


inliner - new version 2.4.0.0 - Michael Heidemann - 2018-10-01

(2018-03-23, 19:31)Michael Heidemann Wrote: I just uploaded a new build of the old commandline tool inliner to my webspace.

I hope all the bad experiences in the past are now gone Smile . I already inlined a file to a 970 MB output file.

You can download it from ldraw.heidemann.org

Please leave your comments for other users and me here.

have fun
cu
mikeheide