This repository has been archived on 2023-10-09. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
blender-archive/source/blender/blenkernel/intern
Bastien Montagne 46607bc09d ID Management: Improve speed of code used when creating/renaming and ID.
This commit affects `id_sort_by_name()` and `check_for_dupid()` helper:
* Add a new parameter, `ID *id_sorting_hint`, to `id_sort_by_name()`,
  and when non-NULL, check if we can insert `id` immediately before or
  after it. This can dramatically reduce time spent in that function.
* Use loop over whole list in `check_for_dupid()` to also define the
  likely ID pointer that will be neighbor with our new one.

This gives another decent speedup to all massive addition cases:

| Number and type of names of IDs  | old code | new code | speed improvement |
| -------------------------------- | -------- | -------- | ----------------- |
| 40K, mixed (14k rand, 26k const) |      39s |      33s |               18% |
| 40K, fully random                |      51s |      42s |               21% |
| 40K, fully constant              |      40s |      34s |               18% |

Combined with the previous commits, this makes massive addition of IDs more
than twice as fast as previously.
2019-12-20 14:29:35 +01:00
..
2019-09-30 17:07:05 +10:00
2019-12-07 01:35:53 +11:00
2019-09-09 14:26:42 +02:00
2019-09-12 04:58:09 +10:00
2019-08-06 21:59:13 +10:00
2019-09-14 08:12:53 +10:00
2019-11-27 16:05:54 +01:00
2019-12-11 10:56:53 +11:00
2019-11-27 14:54:53 +11:00
2019-12-17 08:47:06 +11:00
2019-12-20 10:46:17 +11:00
2019-10-10 10:29:50 +11:00
2019-11-25 01:51:11 +11:00
2019-11-25 01:51:11 +11:00
2019-08-01 14:02:41 +10:00
2019-08-01 14:02:41 +10:00
2019-11-25 01:51:11 +11:00
2019-11-08 11:44:23 +11:00
2019-09-12 04:58:09 +10:00
2019-08-01 14:02:41 +10:00
2019-11-25 01:51:11 +11:00
2019-11-25 01:51:11 +11:00
2019-09-12 04:58:09 +10:00
2019-08-17 00:57:05 +10:00
2019-11-25 01:51:11 +11:00
2019-09-27 19:12:51 +02:00
2019-12-17 08:58:43 +11:00
2019-12-10 20:44:46 +01:00
2019-09-08 00:23:25 +10:00
2019-10-09 21:23:11 +02:00
2019-10-29 19:29:38 +11:00
2019-11-25 01:51:11 +11:00
2019-11-11 10:56:07 -03:00
2019-09-14 08:12:53 +10:00
2019-09-12 04:58:09 +10:00
2019-11-25 01:51:11 +11:00
2019-10-10 10:29:50 +11:00
2019-11-27 16:05:54 +01:00
2019-08-31 01:21:42 +10:00
2019-11-25 01:51:11 +11:00
2019-08-24 12:06:58 +10:00