diff options
| author | Liam P. White <inkscapebrony@gmail.com> | 2015-02-25 01:48:17 +0000 |
|---|---|---|
| committer | Liam P. White <inkscapebrony@gmail.com> | 2015-02-25 01:48:17 +0000 |
| commit | 9b72cebb7ccb500cf447bf75b66fe77875d9945a (patch) | |
| tree | 5110bf55e68dee4b60030f2008a7127ff347c065 /src/sp-object.cpp | |
| parent | Translations. Hungarian translation update. (diff) | |
| parent | Restore libinkscape.a (diff) | |
| download | inkscape-9b72cebb7ccb500cf447bf75b66fe77875d9945a.tar.gz inkscape-9b72cebb7ccb500cf447bf75b66fe77875d9945a.zip | |
Restore libinkscape.a .
I have a feeling this will be a controversial commit, and I feel the same way:
I liked the way the SPObject factories were set up. However, they placed undue
stress on the linker to extract every single symbol from every object file,
and this isn't something that it easy for the linker: it continually thrashes
my system with 8 GB of RAM for more and more memory, with my system often times
running out.
This is not the only solution, but for now, it's quite a good one, and the
comment in Makefile.am remains true: libinkscape.a does speed up the build. In
the future, I'd hope to see proper code modules and an incremental link, which
should really help speed up the build.
(bzr r13940)
Diffstat (limited to 'src/sp-object.cpp')
| -rw-r--r-- | src/sp-object.cpp | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/sp-object.cpp b/src/sp-object.cpp index 1094b88a7..343db435e 100644 --- a/src/sp-object.cpp +++ b/src/sp-object.cpp @@ -61,14 +61,6 @@ using std::strstr; # define debug(f, a...) /* */ #endif -namespace { - SPObject* createObject() { - return new SPObject(); - } - - bool gridRegistered = SPFactory::instance().registerObject("inkscape:grid", createObject); -} - guint update_in_progress = 0; // guard against update-during-update Inkscape::XML::NodeEventVector object_event_vector = { @@ -629,7 +621,7 @@ void SPObject::child_added(Inkscape::XML::Node *child, Inkscape::XML::Node *ref) const std::string type_string = NodeTraits::get_type_string(*child); - SPObject* ochild = SPFactory::instance().createObject(type_string); + SPObject* ochild = SPFactory::createObject(type_string); if (ochild == NULL) { // Currenty, there are many node types that do not have // corresponding classes in the SPObject tree. @@ -688,7 +680,7 @@ void SPObject::build(SPDocument *document, Inkscape::XML::Node *repr) { for (Inkscape::XML::Node *rchild = repr->firstChild() ; rchild != NULL; rchild = rchild->next()) { const std::string typeString = NodeTraits::get_type_string(*rchild); - SPObject* child = SPFactory::instance().createObject(typeString); + SPObject* child = SPFactory::createObject(typeString); if (child == NULL) { // Currenty, there are many node types that do not have // corresponding classes in the SPObject tree. |
