{"id":3804,"date":"2022-02-17T10:11:03","date_gmt":"2022-02-17T10:11:03","guid":{"rendered":"http:\/\/the-codest.localhost\/blog\/ways-to-increase-your-rails-performance\/"},"modified":"2024-07-04T21:01:27","modified_gmt":"2024-07-04T21:01:27","slug":"kuidas-suurendada-oma-roobasteede-joudlust","status":"publish","type":"post","link":"https:\/\/thecodest.co\/et\/blog\/ways-to-increase-your-rails-performance\/","title":{"rendered":"Kuidas suurendada Railsi j\u00f5udlust"},"content":{"rendered":"<h2 class=\"wp-block-heading\"><strong>Ruby First<\/strong><\/h2>\n\n\n\n<p><strong><a href=\"https:\/\/thecodest.co\/et\/case-studies\/providing-a-team-of-ruby-developers-for-a-fintech-company\/\">Ruby<\/a><\/strong> on tugevalt objektorienteeritud keel. Tegelikult on (peaaegu) k\u00f5ik, mis on <strong>Ruby<\/strong> on objekt. Ebavajalike objektide loomine v\u00f5ib maksta teie programmile palju lisam\u00e4lu, seega peate seda v\u00e4ltima.<\/p>\n\n\n\n<p>Erinevuse m\u00f5\u00f5tmiseks kasutame <em><a href=\"https:\/\/github.com\/SamSaffron\/memory_profiler\">memory_profiler<\/a><\/em> p\u00e4rl ja sisseehitatud v\u00f5rdlusmoodul, et m\u00f5\u00f5ta aja j\u00f5udlust.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Kasuta bang! meetodeid stringide puhul<\/strong><\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"ruby\" class=\"language-ruby\">n\u00f5uda \"memory_profiler\"\n\nreport = MemoryProfiler.report do\n<a href=\"https:\/\/thecodest.co\/et\/blog\/app-data-collection-security-risks-value-and-types-explored\/\">andmed<\/a> = \"X\" * 1024 * 1024 * 100\ndata = data.downcase\nend\n\nreport.pretty_print<\/code><\/pre>\n\n\n\n<p>Allj\u00e4rgnevas loetelus l\u00f5ime 100MB suuruse stringi ja v\u00e4hendasime iga selles sisalduvat m\u00e4rki. Meie v\u00f5rdlusuuring annab <a href=\"https:\/\/thecodest.co\/et\/blog\/why-us-companies-are-opting-for-polish-developers\/\">us<\/a> j\u00e4rgmine aruanne:<\/p>\n\n\n\n<p><em>Kokku eraldatud: 210765044 baiti (6 objekti)<\/em><\/p>\n\n\n\n<p>Kui me aga asendame rea 6 j\u00e4rgmisega:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"ruby\" class=\"language-ruby\"><code>data.downcase!<\/code><\/code><\/pre>\n\n\n\n<p><code> <\/code><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Loe faile rea kaupa<\/strong><\/h2>\n\n\n\n<p>V\u00e4idetavalt on meil vaja hankida csv-failist 2 miljoni kirje suurune andmekogum. Tavaliselt n\u00e4eb see v\u00e4lja nii:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"ruby\" class=\"language-ruby\">n\u00f5uda 'benchmark'\n\nBenchmark.bm do |x|\nx.report do\nFile.readlines(\"2mrecords.csv\").map! {|line| line.split(\",\")}\nend\nend<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"\">kasutaja s\u00fcsteem kokku reaalne\n\n12.797000 2.437000 15.234000 (106.319865)<\/code><\/pre>\n\n\n\n<p>Faili t\u00e4ielikuks allalaadimiseks kulus rohkem kui 106 sekundit. P\u00e4ris palju! Kuid me saame seda protsessi kiirendada, kui asendame faili <em>kaart!<\/em> meetodi lihtsa <em>samas kui<\/em> loop:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"ruby\" class=\"language-ruby\">n\u00f5uda 'benchmark'\n\nBenchmark.bm do |x|\nx.report do\nfile = File.open(\"2mrecords.csv\", \"r\")\nwhile line = file.gets\nline.split(\",\")\nend\nend\nend<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"\">kasutaja s\u00fcsteem kokku reaalne\n\n6.078000 0.250000 6.328000 ( 6.649422)<\/code><\/pre>\n\n\n\n<p>N\u00fc\u00fcd on t\u00f6\u00f6aeg drastiliselt langenud, kuna <em>kaart!<\/em> meetod kuulub konkreetsesse klassi, n\u00e4iteks <em>Hash#map<\/em> v\u00f5i <em>Array#map<\/em>, kus <strong>Ruby<\/strong> salvestab iga anal\u00fc\u00fcsitud faili rea m\u00e4llu, niikaua kui seda t\u00e4idetakse. <strong>Ruby pr\u00fcgikoguja <\/strong>ei vabasta m\u00e4lu enne nende iteraatorite t\u00e4ielikku t\u00e4itmist. Samas, lugedes seda rida-realt, GC see \u00fcmber paigutab m\u00e4lu eelmistest ridadest, kui see pole vajalik.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>V\u00e4ltida meetodi iteraatorite kasutamist suuremate kogumite puhul<\/strong><\/h2>\n\n\n\n<p>See on eelmise punkti laiendus, kus on \u00fcks tavalisem n\u00e4ide. Nagu ma mainisin, <a href=\"https:\/\/thecodest.co\/blog\/high-demand-for-ruby-developers\/\">Ruby<\/a> iteraatorid on objektimeetodid ja nad ei vabasta m\u00e4lu seni, kuni neid t\u00e4idetakse. V\u00e4ikesel skaalal on erinevus m\u00f5ttetu (ja meetodid nagu <em>kaart<\/em> tundub loetavam). Suuremate andmekogumite puhul on aga alati hea m\u00f5te kaaluda selle asendamist lihtsamate ts\u00fcklitega. Nagu allj\u00e4rgnevas n\u00e4ites:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"ruby\" class=\"language-ruby\">numberofelements = 10000000\nrandoms = Array.new(numberofelements) { rand(10) }\n\nrandoms.each do |line|\n#teha midagi\nend<\/code><\/pre>\n\n\n\n<p>ja p\u00e4rast refaktoorimist:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"ruby\" class=\"language-ruby\">numberofelements = 10000000\nrandoms = Array.new(numberofelements) { rand(10) }\n\nwhile randoms.count &gt; 0\nline = randoms.shift\n#egem midagi\nend\n\"`<\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Kasutage String::&lt;&lt; meetodit<\/strong><\/h2>\n\n\n\n<p>See on kiire, kuid eriti kasulik n\u00f5uanne. Kui lisate \u00fche stringi teisele, kasutades += operaatorit taga. <strong>Ruby <\/strong> loob t\u00e4iendava objekti. Niisiis, see:\u00a0<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"ruby\" class=\"language-ruby\"><code> a = \"X\"\n b = \"Y\"\n a += b<\/code><\/code><\/pre>\n\n\n\n<p>Tegelikult t\u00e4hendab see seda:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"ruby\" class=\"language-ruby\"><code> a = \"X\"\n b = \"Y\"\n c = a + b\n a = c<\/code><\/code><\/pre>\n\n\n\n<p>Operaator v\u00e4ldiks seda, s\u00e4\u00e4stes teile veidi m\u00e4lu:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"ruby\" class=\"language-ruby\"><code><code> a = \"X\"\n b = \"Y\"\n a &lt;&lt; b<\/code><\/code><\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>R\u00e4\u00e4gime Railsist<\/strong><\/h2>\n\n\n\n<p>The <strong>Rails raamistik <\/strong> omab palju \"<em>gotchas<\/em>\", mis v\u00f5imaldaks teil optimeerida oma <a href=\"https:\/\/thecodest.co\/et\/dictionary\/what-is-code-refactoring\/\">kood<\/a> kiiresti ja ilma liigse lisapingutusteta.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Innukas laadimine AKA n+1 p\u00e4ringu probleem<\/strong><\/h2>\n\n\n\n<p>Oletame, et meil on kaks seotud mudelit, Post ja Autor:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"ruby\" class=\"language-ruby\">class Autor &lt; ApplicationRecord\nhas_many :posts\nend\n\nclass Post &lt; ApplicationRecord\nbelongs_to :author\nend<\/code><\/pre>\n\n\n\n<p>Me tahame tuua k\u00f5ik postitused meie kontrollerisse ja kuvada need vaatesse koos autoritega:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"ruby\" class=\"language-ruby\">kontroller\n\ndef index\n@posts = Post.all.limit(20)\nend\n\nview<\/code><\/pre>\n\n\n\n<p>Kontrollidaja, <a href=\"https:\/\/thecodest.co\/blog\/a-simple-ruby-application-from-scratch-with-active-record\/\">ActiveRecord<\/a> loob ainult \u00fche p\u00e4ringu meie postituste leidmiseks. Kuid hiljem k\u00e4ivitab see ka veel 20 p\u00e4ringut, et leida iga autor vastavalt - see v\u00f5tab t\u00e4iendavalt aega! \u00d5nneks on Railsil olemas kiire lahendus nende p\u00e4ringute \u00fchendamiseks \u00fcheks p\u00e4ringuks. Kasutades <em>sisaldab<\/em> meetodit, v\u00f5ime oma kontrolleri \u00fcmber kirjutada nii:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"ruby\" class=\"language-ruby\"><code> def index\n     @posts = Post.all.includes(:author).limit(20)\n end<\/code><\/code><\/pre>\n\n\n\n<p>Hetkel otsitakse \u00fchte p\u00e4ringusse ainult vajalikud andmed.\u00a0<\/p>\n\n\n\n<p>V\u00f5ite kasutada ka muid kalliskive, n\u00e4iteks <a href=\"https:\/\/github.com\/flyerhzm\/bullet\">bullet<\/a> kogu protsessi kohandamiseks.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Helistage ainult sellele, mida vajate<\/strong><\/h2>\n\n\n\n<p>Teine kasulik tehnika ActiveRecordi kiiruse suurendamiseks on kutsuda ainult neid atribuute, mis on teie praeguste eesm\u00e4rkide jaoks vajalikud. See on eriti kasulik, kui teie rakendus hakkab kasvama ja suureneb ka veergude arv tabeli kohta.<\/p>\n\n\n\n<p>V\u00f5tame oma eelmise koodi n\u00e4itena ja eeldame, et meil on vaja valida ainult autorite nimesid. Seega v\u00f5ime oma kontrolleri \u00fcmber kirjutada:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"ruby\" class=\"language-ruby\"><code><code> def index\n     @posts = Post.all.includes(:author).select(\"name\").limit(20)\n end<\/code><\/code><\/code><\/pre>\n\n\n\n<p>N\u00fc\u00fcd anname meie kontrollerile korralduse j\u00e4tta k\u00f5ik atribuudid v\u00e4lja, v\u00e4lja arvatud see, mida me vajame.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Partiaalide \u00f5igesti esitamine<\/strong><\/h2>\n\n\n\n<p>Oletame, et soovime luua oma postituste jaoks eraldi osa eelmistest n\u00e4idetest:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"ruby\" class=\"language-ruby\">\n<\/code><\/code><\/code><\/code><\/pre>\n\n\n\n<p>Esmapilgul tundub see kood \u00f5ige. Suurema arvu renderdatavate postituste puhul on kogu protsess siiski oluliselt aeglasem. Seda seet\u00f5ttu, et <strong>R\u00f6\u00f6pad <\/strong> kutsub meie osalise uue iteratsiooniga uuesti esile. Me saame seda parandada, kasutades <em>kollektsioonid<\/em> funktsioon:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"ruby\" class=\"language-ruby\"><code><code><code><\/code><\/code><\/code><\/code><\/pre>\n\n\n\n<p>N\u00fc\u00fcd, <strong>R\u00f6\u00f6pad<\/strong> leiab automaatselt v\u00e4lja, millist malli tuleks kasutada, ja initsialiseerib selle ainult \u00fcks kord.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Kasutage taustat\u00f6\u00f6tlust<\/strong><\/h2>\n\n\n\n<p>Iga protsess, mis on aegan\u00f5udvam ja mis ei ole teie praeguse t\u00f6\u00f6voo jaoks oluline, v\u00f5ib olla hea kandidaat taustat\u00f6\u00f6tluseks, nt e-kirjade saatmine, statistika kogumine v\u00f5i perioodiliste aruannete esitamine.&nbsp;<\/p>\n\n\n\n<p><strong>Sidekiq<\/strong> on k\u00f5ige sagedamini kasutatav p\u00e4rl taustat\u00f6\u00f6tluseks. See kasutab <strong>Redis<\/strong> \u00fclesannete salvestamiseks. Samuti v\u00f5imaldab see teil kontrollida oma taustaprotsesside kulgu, jagada need eraldi j\u00e4rjekordadesse ja hallata m\u00e4lukasutust iga\u00fche kohta.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Kirjutage v\u00e4hem koodi, kasutage rohkem kalliskive<\/strong><\/h2>\n\n\n\n<p><strong>R\u00f6\u00f6pad <\/strong> tuli v\u00e4lja tohutu hulk p\u00e4rleid, mis mitte ainult ei tee teie elu lihtsamaks ja kiirendab <a href=\"https:\/\/thecodest.co\/et\/blog\/how-the-codests-team-extension-model-can-transform-your-in-house-development-team\/\">arendusprotsess<\/a>, kuid suurendab ka teie rakenduse j\u00f5udluskiirust. Sellised p\u00e4rlid nagu Devise v\u00f5i Pundit on tavaliselt oma kiiruse osas h\u00e4sti testitud ning t\u00f6\u00f6tavad kiiremini ja turvalisemalt kui samaks otstarbeks spetsiaalselt kirjutatud kood.<\/p>\n\n\n\n<p>K\u00fcsimuste korral parandada <em>Rails j\u00f5udlus<\/em>, reach <strong><a href=\"https:\/\/thecodest.co\">The Codest insenerid<\/a><\/strong> v\u00e4lja, et konsulteerida oma kahtlustega.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/thecodest.co\/careers#offers]\"><img decoding=\"async\" src=\"\/app\/uploads\/2024\/05\/ruby-1-.png\" alt=\"Ruby arendaja pakkumine\"\/><\/a><\/figure>\n\n\n\n<p><strong>Loe edasi:<\/strong><\/p>\n\n\n\n<p><a href=\"https:\/\/thecodest.co\/blog\/pros-and-cons-of-ruby-software-development\/\">Ruby tarkvaraarenduse plussid ja miinused<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/thecodest.co\/blog\/rails-and-other-means-of-transport\">R\u00f6\u00f6pad ja muud transpordivahendid<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/thecodest.co\/blog\/rails-development-with-tmux-vim-fzf-ripgrep\">Railsi arendamine TMUX, Vim, Fzf + Ripgrep abil<\/a><\/p>","protected":false},"excerpt":{"rendered":"<p>Vaatamata oma arvukatele eelistele peetakse Ruby on Rails-d siiski suhteliselt aeglaseks veebiraamistikuks. Me k\u00f5ik teame, et Twitter on lahkunud Railsist Scala kasuks. Kuid m\u00f5ne nutika t\u00e4iustusega saate oma rakendust oluliselt kiiremini k\u00e4ivitada!<\/p>","protected":false},"author":2,"featured_media":3805,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[8],"tags":[],"class_list":["post-3804","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-software-development"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.3 (Yoast SEO v27.3) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>How to Increase Rails Performance - The Codest<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/thecodest.co\/et\/blogi\/kuidas-suurendada-oma-roobasteede-joudlust\/\" \/>\n<meta property=\"og:locale\" content=\"et_EE\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Increase Rails Performance\" \/>\n<meta property=\"og:description\" content=\"Despite its numerous advantages, Ruby on Rails is still considered to be a relatively slow web framework. We all know that Twitter has left Rails in favor of Scala. However, with a few cleaver improvements you can run your app significantly faster!\" \/>\n<meta property=\"og:url\" content=\"https:\/\/thecodest.co\/et\/blogi\/kuidas-suurendada-oma-roobasteede-joudlust\/\" \/>\n<meta property=\"og:site_name\" content=\"The Codest\" \/>\n<meta property=\"article:published_time\" content=\"2022-02-17T10:11:03+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-07-04T21:01:27+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/thecodest.co\/app\/uploads\/2024\/05\/ways_to_increase_your_rails_performance.png\" \/>\n\t<meta property=\"og:image:width\" content=\"960\" \/>\n\t<meta property=\"og:image:height\" content=\"540\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"thecodest\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"thecodest\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/ways-to-increase-your-rails-performance\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/ways-to-increase-your-rails-performance\\\/\"},\"author\":{\"name\":\"thecodest\",\"@id\":\"https:\\\/\\\/thecodest.co\\\/#\\\/schema\\\/person\\\/7e3fe41dfa4f4e41a7baad4c6e0d4f76\"},\"headline\":\"How to Increase Rails Performance\",\"datePublished\":\"2022-02-17T10:11:03+00:00\",\"dateModified\":\"2024-07-04T21:01:27+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/ways-to-increase-your-rails-performance\\\/\"},\"wordCount\":856,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/thecodest.co\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/ways-to-increase-your-rails-performance\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/thecodest.co\\\/app\\\/uploads\\\/2024\\\/05\\\/ways_to_increase_your_rails_performance.png\",\"articleSection\":[\"Software Development\"],\"inLanguage\":\"et\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/thecodest.co\\\/blog\\\/ways-to-increase-your-rails-performance\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/ways-to-increase-your-rails-performance\\\/\",\"url\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/ways-to-increase-your-rails-performance\\\/\",\"name\":\"How to Increase Rails Performance - The Codest\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/thecodest.co\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/ways-to-increase-your-rails-performance\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/ways-to-increase-your-rails-performance\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/thecodest.co\\\/app\\\/uploads\\\/2024\\\/05\\\/ways_to_increase_your_rails_performance.png\",\"datePublished\":\"2022-02-17T10:11:03+00:00\",\"dateModified\":\"2024-07-04T21:01:27+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/ways-to-increase-your-rails-performance\\\/#breadcrumb\"},\"inLanguage\":\"et\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/thecodest.co\\\/blog\\\/ways-to-increase-your-rails-performance\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"et\",\"@id\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/ways-to-increase-your-rails-performance\\\/#primaryimage\",\"url\":\"https:\\\/\\\/thecodest.co\\\/app\\\/uploads\\\/2024\\\/05\\\/ways_to_increase_your_rails_performance.png\",\"contentUrl\":\"https:\\\/\\\/thecodest.co\\\/app\\\/uploads\\\/2024\\\/05\\\/ways_to_increase_your_rails_performance.png\",\"width\":960,\"height\":540},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/ways-to-increase-your-rails-performance\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/thecodest.co\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Increase Rails Performance\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/thecodest.co\\\/#website\",\"url\":\"https:\\\/\\\/thecodest.co\\\/\",\"name\":\"The Codest\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/thecodest.co\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/thecodest.co\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"et\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/thecodest.co\\\/#organization\",\"name\":\"The Codest\",\"url\":\"https:\\\/\\\/thecodest.co\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"et\",\"@id\":\"https:\\\/\\\/thecodest.co\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/thecodest.co\\\/app\\\/uploads\\\/2024\\\/03\\\/thecodest-logo.svg\",\"contentUrl\":\"https:\\\/\\\/thecodest.co\\\/app\\\/uploads\\\/2024\\\/03\\\/thecodest-logo.svg\",\"width\":144,\"height\":36,\"caption\":\"The Codest\"},\"image\":{\"@id\":\"https:\\\/\\\/thecodest.co\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/pl.linkedin.com\\\/company\\\/codest\",\"https:\\\/\\\/clutch.co\\\/profile\\\/codest\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/thecodest.co\\\/#\\\/schema\\\/person\\\/7e3fe41dfa4f4e41a7baad4c6e0d4f76\",\"name\":\"thecodest\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"et\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5dbfe6a1e8c86e432e8812759e34e6fe82ebac75119ae3237a6c1311fa19caf4?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5dbfe6a1e8c86e432e8812759e34e6fe82ebac75119ae3237a6c1311fa19caf4?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5dbfe6a1e8c86e432e8812759e34e6fe82ebac75119ae3237a6c1311fa19caf4?s=96&d=mm&r=g\",\"caption\":\"thecodest\"},\"url\":\"https:\\\/\\\/thecodest.co\\\/et\\\/author\\\/thecodest\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Kuidas suurendada r\u00f6\u00f6baste j\u00f5udlust - The Codest","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/thecodest.co\/et\/blogi\/kuidas-suurendada-oma-roobasteede-joudlust\/","og_locale":"et_EE","og_type":"article","og_title":"How to Increase Rails Performance","og_description":"Despite its numerous advantages, Ruby on Rails is still considered to be a relatively slow web framework. We all know that Twitter has left Rails in favor of Scala. However, with a few cleaver improvements you can run your app significantly faster!","og_url":"https:\/\/thecodest.co\/et\/blogi\/kuidas-suurendada-oma-roobasteede-joudlust\/","og_site_name":"The Codest","article_published_time":"2022-02-17T10:11:03+00:00","article_modified_time":"2024-07-04T21:01:27+00:00","og_image":[{"width":960,"height":540,"url":"https:\/\/thecodest.co\/app\/uploads\/2024\/05\/ways_to_increase_your_rails_performance.png","type":"image\/png"}],"author":"thecodest","twitter_card":"summary_large_image","twitter_misc":{"Written by":"thecodest","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/thecodest.co\/blog\/ways-to-increase-your-rails-performance\/#article","isPartOf":{"@id":"https:\/\/thecodest.co\/blog\/ways-to-increase-your-rails-performance\/"},"author":{"name":"thecodest","@id":"https:\/\/thecodest.co\/#\/schema\/person\/7e3fe41dfa4f4e41a7baad4c6e0d4f76"},"headline":"How to Increase Rails Performance","datePublished":"2022-02-17T10:11:03+00:00","dateModified":"2024-07-04T21:01:27+00:00","mainEntityOfPage":{"@id":"https:\/\/thecodest.co\/blog\/ways-to-increase-your-rails-performance\/"},"wordCount":856,"commentCount":0,"publisher":{"@id":"https:\/\/thecodest.co\/#organization"},"image":{"@id":"https:\/\/thecodest.co\/blog\/ways-to-increase-your-rails-performance\/#primaryimage"},"thumbnailUrl":"https:\/\/thecodest.co\/app\/uploads\/2024\/05\/ways_to_increase_your_rails_performance.png","articleSection":["Software Development"],"inLanguage":"et","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/thecodest.co\/blog\/ways-to-increase-your-rails-performance\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/thecodest.co\/blog\/ways-to-increase-your-rails-performance\/","url":"https:\/\/thecodest.co\/blog\/ways-to-increase-your-rails-performance\/","name":"Kuidas suurendada r\u00f6\u00f6baste j\u00f5udlust - The Codest","isPartOf":{"@id":"https:\/\/thecodest.co\/#website"},"primaryImageOfPage":{"@id":"https:\/\/thecodest.co\/blog\/ways-to-increase-your-rails-performance\/#primaryimage"},"image":{"@id":"https:\/\/thecodest.co\/blog\/ways-to-increase-your-rails-performance\/#primaryimage"},"thumbnailUrl":"https:\/\/thecodest.co\/app\/uploads\/2024\/05\/ways_to_increase_your_rails_performance.png","datePublished":"2022-02-17T10:11:03+00:00","dateModified":"2024-07-04T21:01:27+00:00","breadcrumb":{"@id":"https:\/\/thecodest.co\/blog\/ways-to-increase-your-rails-performance\/#breadcrumb"},"inLanguage":"et","potentialAction":[{"@type":"ReadAction","target":["https:\/\/thecodest.co\/blog\/ways-to-increase-your-rails-performance\/"]}]},{"@type":"ImageObject","inLanguage":"et","@id":"https:\/\/thecodest.co\/blog\/ways-to-increase-your-rails-performance\/#primaryimage","url":"https:\/\/thecodest.co\/app\/uploads\/2024\/05\/ways_to_increase_your_rails_performance.png","contentUrl":"https:\/\/thecodest.co\/app\/uploads\/2024\/05\/ways_to_increase_your_rails_performance.png","width":960,"height":540},{"@type":"BreadcrumbList","@id":"https:\/\/thecodest.co\/blog\/ways-to-increase-your-rails-performance\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/thecodest.co\/"},{"@type":"ListItem","position":2,"name":"How to Increase Rails Performance"}]},{"@type":"WebSite","@id":"https:\/\/thecodest.co\/#website","url":"https:\/\/thecodest.co\/","name":"The Codest","description":"","publisher":{"@id":"https:\/\/thecodest.co\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/thecodest.co\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"et"},{"@type":"Organization","@id":"https:\/\/thecodest.co\/#organization","name":"The Codest","url":"https:\/\/thecodest.co\/","logo":{"@type":"ImageObject","inLanguage":"et","@id":"https:\/\/thecodest.co\/#\/schema\/logo\/image\/","url":"https:\/\/thecodest.co\/app\/uploads\/2024\/03\/thecodest-logo.svg","contentUrl":"https:\/\/thecodest.co\/app\/uploads\/2024\/03\/thecodest-logo.svg","width":144,"height":36,"caption":"The Codest"},"image":{"@id":"https:\/\/thecodest.co\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/pl.linkedin.com\/company\/codest","https:\/\/clutch.co\/profile\/codest"]},{"@type":"Person","@id":"https:\/\/thecodest.co\/#\/schema\/person\/7e3fe41dfa4f4e41a7baad4c6e0d4f76","name":"thecodest","image":{"@type":"ImageObject","inLanguage":"et","@id":"https:\/\/secure.gravatar.com\/avatar\/5dbfe6a1e8c86e432e8812759e34e6fe82ebac75119ae3237a6c1311fa19caf4?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/5dbfe6a1e8c86e432e8812759e34e6fe82ebac75119ae3237a6c1311fa19caf4?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/5dbfe6a1e8c86e432e8812759e34e6fe82ebac75119ae3237a6c1311fa19caf4?s=96&d=mm&r=g","caption":"thecodest"},"url":"https:\/\/thecodest.co\/et\/author\/thecodest\/"}]}},"_links":{"self":[{"href":"https:\/\/thecodest.co\/et\/wp-json\/wp\/v2\/posts\/3804","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/thecodest.co\/et\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/thecodest.co\/et\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/thecodest.co\/et\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/thecodest.co\/et\/wp-json\/wp\/v2\/comments?post=3804"}],"version-history":[{"count":8,"href":"https:\/\/thecodest.co\/et\/wp-json\/wp\/v2\/posts\/3804\/revisions"}],"predecessor-version":[{"id":8428,"href":"https:\/\/thecodest.co\/et\/wp-json\/wp\/v2\/posts\/3804\/revisions\/8428"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/thecodest.co\/et\/wp-json\/wp\/v2\/media\/3805"}],"wp:attachment":[{"href":"https:\/\/thecodest.co\/et\/wp-json\/wp\/v2\/media?parent=3804"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/thecodest.co\/et\/wp-json\/wp\/v2\/categories?post=3804"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/thecodest.co\/et\/wp-json\/wp\/v2\/tags?post=3804"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}