Blender Git Statistics -> Developers -> bnagirniak
Bogdan Nagirniak (bnagirniak)
Total Commits : 2
Master Commits : 2
Branch Commits : 0
First Commit : March 19, 2018
Latest Commit : March 13, 2020
Commits by Month
Date | Number of Commits | |
---|---|---|
March, 2020 | 1 | |
February, 2020 | 0 | |
January, 2020 | 0 | |
December, 2019 | 0 | |
November, 2019 | 0 | |
October, 2019 | 0 | |
September, 2019 | 0 | |
August, 2019 | 0 | |
July, 2019 | 0 | |
June, 2019 | 0 | |
May, 2019 | 0 | |
April, 2019 | 0 | |
March, 2019 | 0 | |
February, 2019 | 0 | |
January, 2019 | 0 | |
December, 2018 | 0 | |
November, 2018 | 0 | |
October, 2018 | 0 | |
September, 2018 | 0 | |
August, 2018 | 0 | |
July, 2018 | 0 | |
June, 2018 | 0 | |
May, 2018 | 0 | |
April, 2018 | 0 | |
March, 2018 | 1 |
Favourite Files
Filename | Total Edits |
---|---|
bpy_rna.c | 1 |
readfile.c | 1 |
CMakeLists.txt | 1 |
bl_pyapi_prop_array.py | 1 |
File Changes
Action | Total | Per Commit |
---|---|---|
Added | 1 | 0.5 |
Modified | 3 | 1.5 |
Code Changes
Action | Total | Per Commit |
---|---|---|
Lines Added | 271 | 135.5 |
Lines Removed | 4 | 2.0 |
Latest commits
March 13, 2020, 11:59 (GMT) |
Python: add foreach_get and foreach_set methods to pyrna_prop_array This allows fast access to various arrays in the Python API. Most notably, `image.pixels` can be accessed much more efficiently now. **Benchmark** Below are the results of a benchmark that compares different ways to set/get all pixel values. I do the tests on 2048x2048 rgba images. The benchmark tests the following dimensions: - Byte vs. float per color channel - Python list vs. numpy array containing floats - `foreach_set` (new) vs. `image.pixels = ...` (old) ``` Pixel amount: 2048 * 2048 = 4.194.304 Byte buffer size: 16.8 mb Float buffer size: 67.1 mb Set pixel colors: byte - new - list: 271 ms byte - new - buffer: 29 ms byte - old - list: 350 ms byte - old - buffer: 2900 ms float - new - list: 249 ms float - new - buffer: 8 ms float - old - list: 330 ms float - old - buffer: 2880 ms Get pixel colors: byte - list: 128 ms byte - buffer: 9 ms float - list: 125 ms float - buffer: 8 ms ``` **Observations** The best set and get speed can be achieved with buffers and a float image, at the cost of higher memory consumption. Furthermore, using buffers when using `pixels = ...` is incredibly slow, because it is not optimized. Optimizing this is possible, but might not be trivial (there were multiple attempts afaik). Float images are faster due to overhead introduced by the api for byte images. If I profiled it correctly, a lot of time is spend in the `[0, 1] -> {0, ..., 255}` conversion. The functions doing that conversion is `unit_float_to_uchar_clamp`. While I have an idea on how it can be optimized, I do not know if it can be done without changing its functionality slightly. Performance wise the best solution would be to not do this conversion at all and accept byte input from the api user directly, but that seems to be a more involved task as well. Differential Revision: https://developer.blender.org/D7053 Reviewers: JacquesLucke, mont29 |
March 19, 2018, 21:14 (GMT) |
Fix T54019: copying and linking bugs with custom ID pointer properties. |
MiikaHweb - Blender Git Statistics v1.06