Subject:
|
Re: Sub-Parting
|
Newsgroups:
|
lugnet.cad
|
Date:
|
Mon, 3 Jan 2011 07:08:38 GMT
|
Viewed:
|
17484 times
|
| |
| |
In lugnet.cad, Tore Eriksson wrote:
> Making sub-parts is a very good method to keep file sizes down when large
> portions of code can be used twice or more times in the same part or in several
> parts.
>
> But my question is, how small can this code snippet be before it's better to not
> sub-part? Of course, it comes down to how many times that sub-part is used. A
> relatively small portion, just three or four lines, that is repeated 50 times in
> just one file is ok to have in a separate sub-part.
>
> The tendency is very in the direction of more sub-parts is very strong as I can
> see.
> In the latest Parts Update (LCad1003), there are 121 sub-files in 605 "real"
> part files. That gives a ratio of exactly 1:5.
> Among the unofficial files in the PT, there are 829 sub-files compared to 1897
> "real" part files. That gives a ratio of 1:2.29.
> One explaination may be that most parts LDrawn today are so complicated that
> there is an obvious gain in re-using large portions of code two or more times.
>
> But maybe there is another explaination, too? These five sub-parts from the
> latest update are only used once in one single part file, and none in previous
> parts or in the PT:
> 2332s01.dat 2684 New 2332.dat 1 Inline ~Duplo Door Frame 2 x 4 x 3 with Raised Door Outline-Backside
> 3144s01.dat 1051 (N) 3144.dat 1 Inline ~Antenna 5H with Side Spokes - Base
> 3629pw2a.dat 1869 New 3629pw2.dat 1 Inline ~Minifig Hat Cowboy with Silver
> Star Pattern - Silver Detail
> 3736c.dat 22468 Old 3736.dat 1 Inline ~Technic Pulley Wheel 5D Center
> 63082s01.dat 1277 New 63082.dat 1 Inline ~Plate 2 x 2 with Towball Socket
> and Axlehole - Plate
>
> What's the point of creating such sub-parts? None, if I'm not missing anything
> here.
> Also, those files with just a few kB used only twice, for a left and right half
> of one part or a left and a right version of a part - is there no lower limit
> how small these portions can be and still a sub-part is justified?
>
> /Tore
I think in most cases it is to break down complexity at first point.
At second thinking about reusage by other parts (maybe already official).
Or in case of your first example (I am the author) just because it is a physical
part from a special mould that is glued together with the main part. So I felt
it would be wrong to have that in on single file.
For the other example I do not know why the author has done it in this way, but
I am sure also they have their reasons.
cu
mikeheide
|
|
Message is in Reply To:
| | Sub-Parting
|
| Making sub-parts is a very good method to keep file sizes down when large portions of code can be used twice or more times in the same part or in several parts. But my question is, how small can this code snippet be before it's better to not (...) (14 years ago, 2-Jan-11, to lugnet.cad)
|
3 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|