kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #35587
Re: [RFC] Remove counters from general section of pcbnew file
-
To:
kicad-developers@xxxxxxxxxxxxxxxxxxx
-
From:
Wayne Stambaugh <stambaughw@xxxxxxxxx>
-
Date:
Wed, 25 Apr 2018 15:57:19 -0400
-
Autocrypt:
addr=stambaughw@xxxxxxxxx; prefer-encrypt=mutual; keydata= xsDiBEM0hxQRBAC2fNh3YOVLu1d5GZ0SbrTNldGiGnCJPLqzEnqFX9v6jmf33TMt6EmSLkl6 Wtfkoj0nVwKxcYmJkA8DX0QAokBkwNIzhSsBzQvthBLIk/5LnPVVKrEXOcL4mUyH1doKlkaE slgJozNa6Av+oavcvD02o1zJOloBbaHlNlyRt7fKswCgtIFlVjWggVH/15KfWk+Qo5JVPbME AIUBAQyL2OAx0n60AWec2WHnO9buHuG0ibtICgUMkE+2MRmYyKwYRdyVwGoIUemFuOyHp0AJ InX4T+vy2E7vkwODqjtMLfIoRkokW74Fi4nrvjlhOAw/vdq/twLbAmR9MOfPTpR4y7kQy1O2 /n+RkkRvh26vTzfbQmrH7cBJhk6aA/9Uwvu3E4zNJgHVZeS0HyWtmR1eOPPRbnkPgJTToX5O KMKzTJI/FX6kT7cFoCamitHrW3BJP4Dx+cMMsa47EGxqVTdbVJ4LjogsXTXxb+0Fn1u4zBdx x3Cer6O7+hqWy7zvpzeC6nSREjqDKa5CgHtv/GLm5uFPOmsjAsnHj2tlBs0mV2F5bmUgU3Rh bWJhdWdoIDxzdGFtYmF1Z2h3QGdtYWlsLmNvbT7CYgQTEQIAIgUCWXDoogIbAwYLCQgHAwIG FQgCCQoLBBYCAwECHgECF4AACgkQG1FxaVn4JF5QbACgmUn1LehNSvH8BMlCRmApskCt8sgA nAw4GoFvw6bm3b7w/Tv4cwapzwPAzsFNBEM0hzEQCACAKu77f9o4LpEKOm9gLvbBj53lKYem ELrJ6JXb+Y66bK3kwuj8+zYbOdmvXUmymoWTkr9mm+kwwuqqMNnf37nRraIpFAUno2Ur6ElY yaPp4nKBCsLBijcaNzoKp+upS/7xVKd/+Lmwhma05UDhmMwvXwy4G8xKw11UsUl3kc2dhvWI 4QKm+p09WH/bUssITDsxRQYaccGEKuaTZol7mEWZxI2DiV0FxeuAxAHB/toxWihtcEwUNv8g Q0HJefSWUHsavYgUxGY1L3+nyz8gjViXZtOrJfgVLPxx+fsL0oTPt9pnvDMBynAcUL/Ozcmg CMnQgQp01SkjACUozNPcLNy3AAMFB/9zGkbbwwrKuqSc2ar/wtAvL7HoVJhcEuPFDP0GIE1h 56wNlDonlRsvWaOknMxrm0tnKk9ijhtsbJHbaGtvIMUruboBxVowgkqX3yDi6Qy60V8AnJEN pEQflmX9fU/i7Vn/JoAjL2Ypo1torX/l2M0nnAJMV6dNSACn3F1zfSQaQUN0skWnm7ENjg/S 9pmJl2NQK8MzdmO/kjOk05/FWpNQFA1Q/8GecqGSTSkNMPqzdfxL4PSs60QFDwrRzAREj8Tw QVryePRM3Dh7YxgZHzCD5LGonvPl/TM9jRs7ob0MMUHBgKrPM9Yap0CH28Dn3vVMBs8RG10X JuGS6ujOnZJ9wkkEGBECAAkFAkM0hzECGwwACgkQG1FxaVn4JF6wdQCfSqokQS6ftWlwGN/e +uSvJR4wcrkAn1gPSGRloW9a9w+p6ugM6pNfNNpx
-
In-reply-to:
<CAHBy37fbrEswCH33cHAOqVmLoBtmwuoS_0FQc2zB-F82aCdEag@mail.gmail.com>
-
Openpgp:
preference=signencrypt
-
User-agent:
Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0
Seppe,
I'm comfortable with discussing this change. We are trying to remove
unnecessary board file stuff for improved VCS experience. However, this
change is a board file format change and we are currently in feature
freeze so it will have to wait until after the v5 stable release.
Cheers,
Wayne
On 4/24/2018 5:35 AM, Seppe Stas wrote:
> I would like to remove the counters of the general section in the KiCAD
> PCBNew's file format. By counters I mean the
> links, no_connects, drawings, tracks, zones, modules and nets elements
> in the general section. E.g:
>
> (general
> *(links 280)*
> *(no_connects 0)*
> (area 29.899999 29.899999 225.100001 106.600001)
> (thickness 1.6)
> *(drawings 67)*
> *(tracks 987)*
> *(zones 0)*
> * (modules 108)*
> * (nets 81)*
> )
>
> When checking PCB designs into a SCM these counters make it virtually
> impossible to handle merges, since they pretty much always cause merge
> conflicts. Even if someone commits a small fix on the other side of the
> board another person is working on, this fix could (and typically does)
> cause one of the counters to change, resulting in a merge conflict. The
> only ways to fix the conflict is manually calculating the new values for
> the conflicting counters or re-doing the fix. Both methods are a pain
> for people not that familiar with the SCM (most people).
>
> These counters are also redundant, potentially causing inconsistency
> because of potential bugs in PCBNew or by altering the PCB file manual
> (something I often end up doing due to limitations of PCBNew) or using
> third-party tools like my company's tooling
> <https://github.com/productize/kicad-parse-gen> (again, to cope with
> limitations in PCBNew).
>
> By looking into the code I found that only the "nets" and "no_connects"
> counters are actually parsed by PCBNew, the others are ignored (see
> pcb_parser:cpp:~600). The netlist counter is only used to set an initial
> size for the `m_netCodes` map. When finding new netlists this map is
> resized, so it should work (inefficiently) without it. Setting a big
> enough value or resizing using grow algorithm
> <https://en.wikipedia.org/wiki/Dynamic_array> (a bit more memory
> intensive) or counting the nets in the file (more io intensive) would
> make it more performant.
>
> The amount of unconnected nets can just be calculated by building the
> board's ratsnest (PCB_BASE_FRAME::Build_Board_Ratsnest) after parsing it.
>
> I would like to commit a patch for this, but I would like to discuss how
> backwards compatibility could be handled first.
>
> Greeting
> Seppe Stas
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help : https://help.launchpad.net/ListHelp
>
References