XLST potential become a issue for very large design?

I wounder if KiCad developer aware that using XML, and XLST for generate BOM going to be issue for large design, and very slow due to it’s architecture, and generate a file one time use file?


I would think in the future, it would be better to have action-plugin that allow users script to directly generate BOM from native file. This can be much faster, and do not required to dump everything into memory.

that thread is 9 years old… do you have any evidence that this will be a problem in practice? I have a hard time believing any reasonable BOM will be an issue for a modern computer.

This is a very trouble some technical assumption to me. Where people make fast computer slow again. Then ask for faster computer.

Kicad does not limit users to xslt. You can for example run python scrips or nodejs. Both have very efficient xml parser libraries. (See my faq article for some examples: How to create a bill of materials (BOM)?)

@Rene_Poschl: I do understand that.

I would think the current easy to do BOM from KiCad is the xlst dialog windows for BOM gen. I would rather to see the “action plugin” support in eeschamtic so we can run BOM gen from there instead of current XLST. I don’t think we event need to use XLST.

There is no xslt dialog. The bom dialog does not even come pre filled with the xslt scripts. (On a clean install there is no script pre defined.) Read my tutorial. I show how to use one of the python scripts that are shipped with kicad.

some times back I have faced an issue with xsltproc with a specific project(not mine) only partial BOM was generated and Kibom did it well.

1 Like

I just finish the script for my work. This is another way of doing CSV BOM <==> SCH (both direction):

  • bom2csv script: Is use to run from eeschma Generate Bill of Material/command line tool, it just all most the same with supplied one, but some special recognized fields in the order I
$ bom2csv.py
Usage  bom2csv.py <generic_netlist.xml> <output.csv>
  • bom2sch script: Run on command line tool, should take any csv output files from supplied eeschema BOM scripts (full or partial) and back annotate back to schematic. I try design this script so it can:
    • Run on very very large size project without using much of memory other than the whole BOM table.
    • Update the component’s value at the location where they were in the original schematic files, so diff is very easy compare to using KiField scripts.
$ bom2sch.py
2019-01-18 16:44:34,190 [bom2sch.py:257 ]
    bom2sch.py csv_file.csv [root_schematic_file.sch]

    root_schematic_file.sch can be automatically extracted from csv file
    where "Source:" field specified in the header meta data. This usually
    create by eeschema BOM generator scripts

beta scripts here

FYI, pyc files are trivially converted to py source…

1 Like
"""myEqu is a more advanced equivalence function for components which is

used by component grouping. Normal operation is to group components based
on their value and footprint.
In this example of a custom equivalency operator we compare the
value, the part name and the footprint.


look familiar?

Yes. It have it own use!

just saying if you’re worried about publishing the source, you already have.

wow, uncompile really work, it just all most exactly source code! Well, I build .exe files for now.

I able to put my “dumb” code here. Hope some one look at it, and let me know if I’m completely nuts :slight_smile:

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.