FreeCAD: master 08297e52

Author Committer Branch Timestamp Parent
J-Dunn wmayer master 2020-12-27 08:59:07 master 305fb03c
Changeset Path: fix unnecessary copy on read for Command.parameters dict

Contents of underlying c++ std::map data is copied to a new PyDict on every read. This is contrary to expected python behaviour which would normally just return the pointer to a python object and increment the reference counter for it. This was leading to massive redundant deletion and copying in all post processors which reference this variable in a nested loop. This PR adds a permanent dict member to the class and keeps track of changes to avoid unnecessary copying.
mod - src/Mod/Path/App/CommandPy.xml Diff File
mod - src/Mod/Path/App/CommandPyImp.cpp Diff File