GSoC 2019: Fast Import and Export Weekly reports

Over the past week, I worked on an initial STL implementation and on more foundational code, which will hopefully be robust enough to be the final version. The biggest change was changing from my previous use of for_each functor-calling functions to proper iterators, backed by boost iterator_facade and iterator_adaptor. This not only makes the code faster, but also easier to read. In retrospect, it’s clearly the right way to do it, as it is also more composable. In addition, I added an option to disable deduplication of normals and UVs, which would make the export faster and less memory intensive, at the cost of a higher output file.

Tasks this week:

  • Axis remap
  • Option to disable deduplication
  • Better UI
  • Implementation of C++ iterators for data structures like objects and vertices

Unfortunately, I also had some health problems so I wasn’t able to get as much work done as I would like, but I expect it to be over for now.

10 Likes

This past week I mainly fixed the iterator implementation and completed the STL export. It not supports selection awareness and both the binary and ASCII variants.
There were some refactorings, UI fixes and a general overview of the code. The UI code for OBJ and STL was separated. The iterator code was documented, explaining roughly how it works and it’s purpose. There were 6 commits this week.

3 Likes

This past week I mainly refactored the code and fixed various bugs. In addition, I had exams, so I wasn’t able to dedicate as much time as I hoped. I started properly using clang-format and fixed the emacs integration suggested on the Blender wiki, as it caused the file to not be saved.

I did some more preliminary benchmarks and got the following results for a suzanne with a level 6 subdiv applied:

Implementation Time (size of resultant file)
Python 77.5 s (340mb)
C++ (without duplicates) 45.9 s (290mb)
C++ (with duplicates) 22.4 s (580mb)

These results aren’t quite as expected. This seems to be due to high amounts of indirection resulting from the use of boost, so the next planned step is to change the implementation to not depend on boost for this.

8 Likes

Ok, so after these last two commits, I ran the benchmarks again and got this:

Scene 661c98ca146 (base) b9e10ba1b62 (fprintf) d08fbfacb21 (no boost::iterator_facade) d08fbfacb21 (with duplicates)
Default scene 201ms 31.4ms 1ms 1ms
Took 46.1s 43.1s 40.9s 11.6s

So, yes, some progress :slight_smile:

7 Likes

Hi guys,
awsome results!
There is a interesting topic on blender artists about import/export stuff.
Maybe this is somthing that is easy to implement…