Christian Hergert
38ffcd298c
gresourcefile: simplify path canonicalization
...
Previously, the path canonicalization for resources had liberal use of
strlen() and memmove() while walking through the path. This patch avoids
any secondary strlen() and removes all use of memmove().
A single allocation is created up front as we should only ever need one
additional byte more than then length of the incoming path string.
To keep the implementation readable, the mechanics are kept in external
functions. memrchr() was not used due to its lack of portability.
This is faster in every test case I've tested. Paths that contain
relative ../ have the most speedup.
https://bugzilla.gnome.org/show_bug.cgi?id=790310
2017-11-14 15:13:44 -08:00
..
2015-08-29 08:43:29 -05:00
2017-07-13 19:03:39 -04:00
2017-11-03 20:16:52 +00:00
2017-07-13 22:22:16 -04:00
2017-08-03 12:28:10 +01:00
2017-10-11 10:22:23 +01:00
2012-12-28 21:28:28 -05:00
2013-10-24 13:55:33 -04:00
2014-01-01 17:59:20 -05:00
2017-07-13 19:03:39 -04:00
2015-06-10 21:59:28 -04:00
2010-07-05 00:56:12 -04:00
2013-07-11 13:49:20 -04:00
2010-07-04 20:51:06 -04:00
2010-07-04 20:51:06 -04:00
2013-11-23 22:21:29 -05:00
2012-08-19 02:23:32 -04:00
2017-07-13 19:03:39 -04:00
2017-08-23 11:26:57 +01:00
2014-09-09 14:11:38 -04:00
2015-08-31 13:59:48 -04:00
2013-09-29 17:48:40 -04:00
2015-02-23 10:40:40 -05:00
2014-01-01 22:01:15 -05:00
2013-01-16 10:17:15 -05:00
2013-12-15 21:07:12 -05:00
2017-05-29 19:53:34 +02:00
2017-11-03 12:04:33 +00:00
2016-04-26 15:20:16 +02:00
2015-08-31 13:59:48 -04:00
2014-06-28 14:06:36 -04:00
2012-10-16 09:39:24 -04:00
2013-12-15 21:07:12 -05:00
2017-05-29 19:53:34 +02:00
2017-10-11 12:56:11 +01:00
2017-07-13 19:03:39 -04:00
2017-07-13 19:03:39 -04:00
2012-10-16 09:39:24 -04:00
2010-06-16 18:17:53 -04:00
2017-11-07 08:25:28 -08:00
2014-01-01 17:59:20 -05:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-09-22 20:28:44 +05:00
2017-11-01 12:46:38 +00:00
2015-05-11 20:24:56 +01:00
2013-11-11 07:11:29 +01:00
2011-12-08 18:05:15 -05:00
2012-10-16 09:39:24 -04:00
2012-01-25 16:15:18 -05:00
2010-11-02 23:02:05 -04:00
2012-10-16 09:39:24 -04:00
2010-11-02 23:02:05 -04:00
2017-03-05 13:11:52 -05:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2012-10-16 09:39:24 -04:00
2017-05-29 19:53:34 +02:00
2017-04-10 10:38:31 +01:00
2013-05-31 23:12:15 -04:00
2013-05-31 23:12:15 -04:00
2012-10-16 09:39:24 -04:00
2012-10-16 09:39:24 -04:00
2017-04-10 10:38:31 +01:00
2012-10-16 09:39:24 -04:00
2013-05-21 11:23:22 -03:00
2016-08-15 14:04:43 +01:00
2012-10-16 09:39:24 -04:00
2012-10-16 09:39:24 -04:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-08-03 10:21:13 +01:00
2017-08-03 10:21:13 +01:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-10-26 12:01:05 +01:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2013-05-31 23:12:15 -04:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2013-01-03 13:14:26 -05:00
2017-05-29 19:53:34 +02:00
2017-08-03 10:21:13 +01:00
2017-07-13 19:03:39 -04:00
2015-07-23 04:22:59 -04:00
2014-01-13 16:12:31 -05:00
2017-05-29 19:53:34 +02:00
2017-04-10 10:38:31 +01:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-10-11 14:05:21 +01:00
2017-07-13 19:03:39 -04:00
2017-08-03 10:21:13 +01:00
2017-08-23 11:37:32 +01:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-09-11 22:14:18 +01:00
2016-07-11 17:42:41 -04:00
2015-02-17 16:27:46 -05:00
2015-05-11 20:24:56 +01:00
2017-10-26 00:19:23 +01:00
2013-06-02 01:44:49 -04:00
2013-12-15 21:07:12 -05:00
2017-10-26 00:19:23 +01:00
2014-04-15 11:36:39 -04:00
2017-08-23 11:26:57 +01:00
2015-10-13 15:42:14 +01:00
2017-05-29 19:53:34 +02:00
2011-11-17 14:03:39 +00:00
2013-07-14 11:36:45 -04:00
2016-09-26 06:27:12 -04:00
2012-10-16 09:39:24 -04:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2015-08-31 13:59:48 -04:00
2017-05-29 19:53:34 +02:00
2013-01-14 23:31:59 -05:00
2017-11-14 15:13:44 -08:00
2012-10-16 09:39:24 -04:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2015-10-13 15:42:14 +01:00
2012-10-16 09:39:24 -04:00
2012-02-03 12:58:53 -05:00
2017-05-29 19:53:34 +02:00
2012-10-16 09:39:24 -04:00
2017-05-29 19:53:34 +02:00
2017-10-24 09:02:02 -05:00
2012-10-16 09:39:24 -04:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2012-01-13 17:12:53 +01:00
2012-01-13 17:12:53 +01:00
2012-01-13 17:12:53 +01:00
2012-01-13 17:12:53 +01:00
2012-01-13 17:12:53 +01:00
2012-01-13 17:12:53 +01:00
2012-10-03 11:23:04 -04:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2016-06-04 08:24:22 -04:00
2010-07-01 19:06:02 -04:00
2015-08-21 00:43:54 -04:00
2015-04-22 18:56:50 +08:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2012-12-12 15:20:22 +01:00
2017-10-26 00:19:23 +01:00
2013-06-02 01:47:19 -04:00
2016-06-28 15:57:49 +02:00
2012-10-16 09:39:24 -04:00
2014-08-02 12:41:14 +00:00