Break metadata into smaller chunks (number of chunks=10) for faster delta generation.

Here are some data for comparison.

Without any metadata processing:
 Run Time:
   real 2m22.331s
   user 1m56.040s
   sys  0m6.170s
 Payload Size:
   756162 bytes

With metadata processing (number of chunks=4):
 Run Time:
   real 13m48.292s
   user 13m10.120s
   sys  0m6.920s
 Payload Size:
   749713 bytes

With metadata processing (number of chunks=10):
 Run Time:
   real 3m46.242s
   user 3m17.880s
   sys  0m6.640s
 Payload Size:
   748464 bytes

BUG=chromium-os:10669
TEST=Unit tests and generated delta payloads between two images that do
not have their metadata preserved.  Ran the delta generator with and
without metadata processing and also used different number of chunks for
comparison purposes.

Change-Id: I15ff831b95f43cbebbcca6ecc6a3fbc404b6f065

Review URL: http://codereview.chromium.org/6060012
2 files changed
tree: 4ed87cb73c0f6e40e78a9bd73a2223f3ddd4da06
  1. .gitignore
  2. action.h
  3. action_mock.h
  4. action_pipe.h
  5. action_pipe_unittest.cc
  6. action_processor.cc
  7. action_processor.h
  8. action_processor_mock.h
  9. action_processor_unittest.cc
  10. action_unittest.cc
  11. buffered_file_writer.cc
  12. buffered_file_writer.h
  13. buffered_file_writer_unittest.cc
  14. bzip.cc
  15. bzip.h
  16. bzip_extent_writer.cc
  17. bzip_extent_writer.h
  18. bzip_extent_writer_unittest.cc
  19. chrome_proxy_resolver.cc
  20. chrome_proxy_resolver.h
  21. chrome_proxy_resolver_unittest.cc
  22. cycle_breaker.cc
  23. cycle_breaker.h
  24. cycle_breaker_unittest.cc
  25. dbus_constants.h
  26. dbus_interface.h
  27. dbus_service.cc
  28. dbus_service.h
  29. decompressing_file_writer.cc
  30. decompressing_file_writer.h
  31. decompressing_file_writer_unittest.cc
  32. delta_diff_generator.cc
  33. delta_diff_generator.h
  34. delta_diff_generator_unittest.cc
  35. delta_performer.cc
  36. delta_performer.h
  37. delta_performer_unittest.cc
  38. download_action.cc
  39. download_action.h
  40. download_action_unittest.cc
  41. extent_mapper.cc
  42. extent_mapper.h
  43. extent_mapper_unittest.cc
  44. extent_ranges.cc
  45. extent_ranges.h
  46. extent_ranges_unittest.cc
  47. extent_writer.cc
  48. extent_writer.h
  49. extent_writer_unittest.cc
  50. file_writer.cc
  51. file_writer.h
  52. file_writer_mock.h
  53. file_writer_unittest.cc
  54. filesystem_copier_action.cc
  55. filesystem_copier_action.h
  56. filesystem_copier_action_unittest.cc
  57. filesystem_iterator.cc
  58. filesystem_iterator.h
  59. filesystem_iterator_unittest.cc
  60. flimflam_proxy.cc
  61. flimflam_proxy.h
  62. flimflam_proxy_unittest.cc
  63. full_update_generator.cc
  64. full_update_generator.h
  65. full_update_generator_unittest.cc
  66. gen_coverage_html.sh
  67. generate_delta_main.cc
  68. graph_types.h
  69. graph_utils.cc
  70. graph_utils.h
  71. graph_utils_unittest.cc
  72. gzip.cc
  73. gzip.h
  74. http_fetcher.cc
  75. http_fetcher.h
  76. http_fetcher_unittest.cc
  77. inherit-review-settings-ok
  78. install_plan.h
  79. integration_unittest.cc
  80. libcurl_http_fetcher.cc
  81. libcurl_http_fetcher.h
  82. LICENSE
  83. local_coverage_rate.sh
  84. main.cc
  85. marshal.list
  86. metadata.cc
  87. metadata.h
  88. metadata_unittest.cc
  89. mock_dbus_interface.h
  90. mock_file_writer.h
  91. mock_http_fetcher.cc
  92. mock_http_fetcher.h
  93. multi_range_http_fetcher.cc
  94. multi_range_http_fetcher.h
  95. omaha_hash_calculator.cc
  96. omaha_hash_calculator.h
  97. omaha_hash_calculator_unittest.cc
  98. omaha_request_action.cc
  99. omaha_request_action.h
  100. omaha_request_action_unittest.cc
  101. omaha_request_params.cc
  102. omaha_request_params.h
  103. omaha_request_params_unittest.cc
  104. omaha_response_handler_action.cc
  105. omaha_response_handler_action.h
  106. omaha_response_handler_action_unittest.cc
  107. org.chromium.UpdateEngine.service
  108. payload_signer.cc
  109. payload_signer.h
  110. payload_signer_unittest.cc
  111. postinstall_runner_action.cc
  112. postinstall_runner_action.h
  113. postinstall_runner_action_unittest.cc
  114. prefs.cc
  115. prefs.h
  116. prefs_interface.h
  117. prefs_mock.h
  118. prefs_unittest.cc
  119. proxy_resolver.cc
  120. proxy_resolver.h
  121. SConstruct
  122. setup_dev_packages
  123. simple_key_value_store.cc
  124. simple_key_value_store.h
  125. simple_key_value_store_unittest.cc
  126. split_file_writer.cc
  127. split_file_writer.h
  128. split_file_writer_unittest.cc
  129. subprocess.cc
  130. subprocess.h
  131. subprocess_unittest.cc
  132. tarjan.cc
  133. tarjan.h
  134. tarjan_unittest.cc
  135. terminator.cc
  136. terminator.h
  137. terminator_unittest.cc
  138. test_http_server.cc
  139. test_utils.cc
  140. test_utils.h
  141. testrunner.cc
  142. topological_sort.cc
  143. topological_sort.h
  144. topological_sort_unittest.cc
  145. unittest_key.pem
  146. update_attempter.cc
  147. update_attempter.h
  148. update_attempter_mock.h
  149. update_attempter_unittest.cc
  150. update_check_scheduler.cc
  151. update_check_scheduler.h
  152. update_check_scheduler_unittest.cc
  153. update_engine.xml
  154. update_engine_client.cc
  155. update_metadata.proto
  156. UpdateEngine.conf
  157. utils.cc
  158. utils.h
  159. utils_unittest.cc
  160. WATCHLISTS
  161. zip_unittest.cc