Skip to content
This repository was archived by the owner on Mar 24, 2026. It is now read-only.

Minor optimisations to Elixir/Phoenix implementation - #3848

Merged
NateBrady23 merged 1 commit into
TechEmpower:masterfrom
michalmuskala:opt-phoenix
Jun 12, 2018
Merged

NateBrady23 merged 1 commit into
TechEmpower:masterfrom
michalmuskala:opt-phoenix

Conversation

@michalmuskala

Copy link
Copy Markdown
Contributor
  • Completely disable as much logging as we can
  • Remove unneccessary middlewares
  • Switch to a different, faster, json encoder

* Completely disable as much logging as we can
* Remove unneccessary middlewares
* Switch to a different, faster, json encoder
%{id: id, randomnumber: num}
end)))
changeset = Ecto.Changeset.change(w, randomnumber: num)
Repo.update!(changeset)

@leifg leifg Jun 8, 2018 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't this be optimized by using a single update query?

from w in World, where: w.id == ^id,
update: [set: [randomnumber: ^num]]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is benchmark requirement

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's very likely there are more optimisation opportunities, but those have to be explored with some more careful profiling.

@NateBrady23
NateBrady23 merged commit 7249613 into TechEmpower:master Jun 12, 2018
@michalmuskala
michalmuskala deleted the opt-phoenix branch June 12, 2018 15:10
roberthusak pushed a commit to roberthusak/FrameworkBenchmarks that referenced this pull request Nov 6, 2018
* Completely disable as much logging as we can
* Remove unneccessary middlewares
* Switch to a different, faster, json encoder
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants