Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


I have a problem:
in python-uno XMutableTreeNode.removeChildByIndex() takes _seconds_ (sometimes minutes) to remove a node from a tree when the node is not the last in the list of its siblings. LO hangs for some random amount of time, fully consuming one CPU core (good thing i have 8 virtual ones...). From the looks of the stack of its only working thread, he spends all its time somewhere in python26.dll I've had a theory that this is somehow related to garbage collecting and memory references, but was unable to fix this by setting DisplayValue and DataValue to new objects (strings) that are not referenced by anything else. Recursively removing all children of the item (it has some) doesn't hang anything, only removing the root of the branch does.
The tree looks like this:
Root
  A
    1
  B
    2
  C
    3
  D
    1
      I
        foo
      II
        bar
    2
      III
        foo
      IV
        bar
    3
    ...
    6
  E
Subitems are removed from the (D) node
Removing (6), then (5), then (4), etc works, while removing anything other than (6) first doesn't. Recursive children pre-removal means that by the time i call (figuratively speaking) (D).removeChildByIndex (1) to remove (1), (1) does not have any children anymore. I think i can work around this by clearing the branch root of children, then copying all children of its bottom siblings up, filling the gaps, then removing the last sibling, which will be empty. But that will certainly take a bit more time and might actually be seen by the user (especially onn slow PCs).


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.