diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..13566b8 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..ee2f02d --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..efbfd54 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/rails-optimization-task7.iml b/.idea/rails-optimization-task7.iml new file mode 100644 index 0000000..6e7c09c --- /dev/null +++ b/.idea/rails-optimization-task7.iml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/case-study.md b/case-study.md new file mode 100644 index 0000000..62fb542 --- /dev/null +++ b/case-study.md @@ -0,0 +1,43 @@ +### Первый прогон + +![img_2.png](img_2.png) + +### PARALLEL + +Второй прогон: +![img_1.png](img_1.png) + + +### RSPEC-DISSECT + +Выявил пару жирных let'ов +* Первая оптимизациия: +``` +Finished in 11.115231994 seconds +Process finished with exit code 0 +``` +Использовал `let_it_be` вместо `let!` для генерации сложной структуры +``` +Finished in 3.488940863 seconds +Process finished with exit code 0 +``` + +* Вторая оптимизациия: +``` +Finished in 7.255991587 seconds +``` +``` +Finished in 1.925112093 seconds +``` + +Подтянул еще парочку мест не под запись + +Остальные спеки показались некритичными по длительности, понятное дело, все подряд не оптимизировал, нет столько времени) + +Потыкался в factory-doctor, не стал менять ничего + +Финальное время +``` +7008 examples, 0 failures, 2 pendings +Took 230 seconds (3:50) +``` \ No newline at end of file diff --git a/img.png b/img.png new file mode 100644 index 0000000..5b7e967 Binary files /dev/null and b/img.png differ diff --git a/img_1.png b/img_1.png new file mode 100644 index 0000000..226eade Binary files /dev/null and b/img_1.png differ diff --git a/img_2.png b/img_2.png new file mode 100644 index 0000000..4184f68 Binary files /dev/null and b/img_2.png differ diff --git a/img_3.png b/img_3.png new file mode 100644 index 0000000..875f77e Binary files /dev/null and b/img_3.png differ