-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Переопределение из БД только тех параметров конфигов, которые есть в …
…описании схемы для админки
- Loading branch information
Showing
1 changed file
with
85 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
474b717
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
я не понял суть кода вообще. нужно будет пересмотреть
474b717
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Берем конфиг из БД и удаляем из него не используемые ключи, которых нет в схеме
474b717
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
но не перезаписываем назада в бд, верно? а я в исюшке писал чтобы добавить отдельный ф-л проверки ключей т.к. это нужно будет крайне редко, а сейчас эта проверка на ключи выше исполняется каждый раз при запуске движка что не очень эффективно. я специально не нагружал этот момент чтобы старт производился максимально быстро.
предлагаю убрать этот код и все таки сделать потом отдельный раздел в утилитах для чистки и записи в бд очищенных данных, т.к. бессмыслено фильтровать постоянно при запуске движка лишние (старые) ключи и не писать результат назад в бд. это как удалить вирус из памяти, но не найти его на диске и не очистить оттуда.
#19
474b717
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Замеры на ноутбуке показывают такой результат - на конфиг ядра уходит 0.008 секунды, остальные плагины на порядок меньше. Поэтому этот момент пока не критичен и он всегда обеспечивает актуальность конфига.
А так согласен, утилиту добавить надо + повесить ее функционал на активацию/деактивацию плагинов.
474b717
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
тогда #19 не закрывать