~jjardon/gtk-doc/trunk

« back to all changes in this revision

Viewing changes to gtkdoc/mkhtml2.py

  • Committer: Stefan Sauer
  • Date: 2018-04-16 19:25:15 UTC
  • Revision ID: git-v1:164cb28491236b7a81db1df2438fe99f8443654a
mkhtml2: try multithreading/processing options

Show diffs side-by-side

added added

removed removed

Lines of Context:
1559
1559
    files = [f for f in PreOrderIter(files) if f.anchor is None]
1560
1560
 
1561
1561
    # 2) extract tables:
1562
 
    # TODO: use multiprocessing
 
1562
    # TODO: can be done in parallel
1563
1563
    # - find all 'id' attribs and add them to the link map
1564
1564
    add_id_links(files, fixxref.Links)
1565
1565
    # - build glossary dict
1566
1566
    build_glossary(files)
1567
1567
 
1568
 
    # 3) create a xxx.devhelp2 file, do this before 3), since we modify the tree
 
1568
    # 3) create a xxx.devhelp2 file, do this before 4), since we modify the tree
1569
1569
    create_devhelp2(out_dir, module, tree.getroot(), files)
 
1570
 
1570
1571
    # 4) iterate the tree and output files
1571
 
    # TODO: use multiprocessing
 
1572
    # TODO: can be done in parallel, figure out why this is not faster
 
1573
    # from multiprocessing.pool import Pool
 
1574
    # with Pool(4) as p:
 
1575
    #     p.apply_async(convert, args=(out_dir, module, files))
 
1576
    # from multiprocessing.pool import ThreadPool
 
1577
    # with ThreadPool(4) as p:
 
1578
    #     p.apply_async(convert, args=(out_dir, module, files))
1572
1579
    for node in files:
1573
1580
        convert(out_dir, module, files, node)
1574
1581