Permalink
Browse files

Made Index/Alias/UID immutable - big performance boost, esp UID

  • Loading branch information...
1 parent 0a0110a commit dc9c5dfc5e3d79ba0f94f97ac30f8f49e2318afd @clintongormley committed Nov 14, 2012
Showing with 6 additions and 0 deletions.
  1. +2 −0 lib/Elastic/Model/Alias.pm
  2. +2 −0 lib/Elastic/Model/Index.pm
  3. +2 −0 lib/Elastic/Model/UID.pm
@@ -84,6 +84,8 @@ sub _add_aliases {
return %indices;
}
+__PACKAGE__->meta->make_immutable;
+
1;
__END__
@@ -262,6 +262,8 @@ sub doc_updater {
};
}
+__PACKAGE__->meta->make_immutable;
+
1;
__END__
View
@@ -152,6 +152,8 @@ sub _build_cache_key {
return join ";", map { s/;/;;/g; $_ } map { $self->$_ } qw(type id);
}
+__PACKAGE__->meta->make_immutable;
+
1;
__END__

0 comments on commit dc9c5df

Please sign in to comment.