improve performance for template repeat over model objects with shared prototype