[wesnoth-commits] [wesnoth/wesnoth] 1066de: Revert "Preallocate memory for image/file presence...

GitHub noreply at github.com
Mon May 21 13:34:08 UTC 2018


  Branch: refs/heads/master
  Home:   https://github.com/wesnoth/wesnoth
  Commit: 1066de1a827338840cfe44a32824e6d1a2e9207f
      https://github.com/wesnoth/wesnoth/commit/1066de1a827338840cfe44a32824e6d1a2e9207f
  Author: Jyrki Vesterinen <sandgtx at gmail.com>
  Date:   2018-05-21 (Mon, 21 May 2018)

  Changed paths:
    M src/image.cpp

  Log Message:
  -----------
  Revert "Preallocate memory for image/file presence caches"

This reverts commit a3ef80853caac8fd1c115418b2474af07dd1cb14.

Vector reallocation cost is logarithmic. Assuming that a vector
starts at a size of one and doubles its size in each allocation, the
result is 11 allocations - completely negligible compared with, you
know, loading 20 000 images from disk.



      **NOTE:** This service been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/

      Functionality will be removed from GitHub.com on January 31st, 2019.


More information about the Commits mailing list