Some small efficiencies in the Chunk-handler

Also, log Maruku's processing time, out of perverse
interest.
This commit is contained in:
Jacques Distler 2011-08-05 01:59:18 -05:00
parent 52da76ff38
commit 14592f57f9
3 changed files with 6 additions and 4 deletions

View file

@ -8,6 +8,7 @@ require_dependency 'chunks/literal'
require 'chunks/nowiki'
require 'sanitizer'
require 'instiki_stringsupport'
require 'set'
# Wiki content is just a string that can process itself with a chain of
@ -53,10 +54,10 @@ module ChunkManager
def init_chunk_manager
@chunks_by_type = Hash.new
Chunk::Abstract::derivatives.each{|chunk_type|
@chunks_by_type[chunk_type] = Array.new
@chunks_by_type[chunk_type] = Set.new
}
@chunks_by_id = Hash.new
@chunks = []
@chunks = Set.new
@chunk_id = 0
end