# File lib/puppet/rails/host.rb, line 184
184:     def compare_to_catalog(existing, list)
185:         compiled = list.inject({}) do |hash, resource|
186:             hash[resource.ref] = resource
187:             hash
188:         end
189: 
190:         resources = nil
191:         debug_benchmark("Resource removal") {
192:             resources = remove_unneeded_resources(compiled, existing)
193:         }
194: 
195:         # Now for all resources in the catalog but not in the db, we're pretty easy.
196:         additions = nil
197:         debug_benchmark("Resource merger") {
198:             additions = perform_resource_merger(compiled, resources)
199:         }
200: 
201:         debug_benchmark("Resource addition") {
202:             additions.each do |resource|
203:                 build_rails_resource_from_parser_resource(resource)
204:             end
205: 
206:             log_accumulated_marks "Added resources"
207:         }
208:     end