View Single Post
Old 06-28-2010, 10:34 PM   #17
toddos
Guru
toddos ought to be getting tired of karma fortunes by now.toddos ought to be getting tired of karma fortunes by now.toddos ought to be getting tired of karma fortunes by now.toddos ought to be getting tired of karma fortunes by now.toddos ought to be getting tired of karma fortunes by now.toddos ought to be getting tired of karma fortunes by now.toddos ought to be getting tired of karma fortunes by now.toddos ought to be getting tired of karma fortunes by now.toddos ought to be getting tired of karma fortunes by now.toddos ought to be getting tired of karma fortunes by now.toddos ought to be getting tired of karma fortunes by now.
 
toddos's Avatar
 
Posts: 695
Karma: 822675
Join Date: May 2010
Device: Kobo Aura, Nokia Lumia 920 (Freda)
Ah, it seems CostFinalize is still very costly, spending about 30 seconds or so processing all of the components. Turning off file costing does appear to be useful, but that just stops costing for flies while CostFinalize will still do costing for components. I think the issue now is that you have a one-to-one mapping of components to files. That's extreme overkill, and I think what's causing CostFinalize to run for so long. If you could instead put all files in a single directory into a single component you should see a reduction in CostFinalize time.

I'm not very familiar with python, but in psuedocode I'd want to change the process_dir() function to do something like:

Code:
For each item in a directory listing:
    if item is a directory:
        Add <Directory /> node
        Recurse on process_dir()
    else:
        If no component node for this current directory exists:
            Create <Component /> node with a unique name (probably need to keep a self._comp_id similar to the self._file_id that's already there)

        Add <File /> node to this directory's <Component />

If a <Component> node was created, add its appropriate </Component> closing node.
Append component node to the output of the subdirectory recursion to get an XML chunk with <Directory /> nodes before the singular <Component /> node.
This should minimize the number of components to a maximum of the number of directories (~400 items, probably less if there are a lot of dirs without files) vs. the number of files (~3750). An order of magnitude in the number of components should significantly reduce costing.

Edit: If you do decide to take out file costing (reducing the components may reduce costing enough that removing file costing doesn't gain anything), you can suppress the warnings by adding -sw1008 to the light.exe command line in wix.py.

Last edited by toddos; 06-28-2010 at 10:37 PM.
toddos is offline   Reply With Quote