Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AutoLoading and Reloading Constants > Load Paths #701

Merged
merged 2 commits into from
Nov 25, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pt-BR/autoloading_and_reloading_constants.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,13 @@ WARNING. Please, do not mutate `ActiveSupport::Dependencies.autoload_paths`, the
$LOAD_PATH
----------

Autoload paths are added to `$LOAD_PATH` by default. However, Zeitwerk uses absolute file names internally, and your application should not issue `require` calls for autoloadable files, so those directories are actually not needed there. You can opt-out with this flag:
Caminhos de carregamento automático são adicionados a `$LOAD_PATH` por padrão. No entanto, o Zeitwerk usa nomes de arquivo absolutos internamente, e sua aplicação não deve emitir chamadas `require` para arquivos carregáveis ​​automaticamente, então esses diretórios não são realmente necessários lá. Você pode cancelar com este sinalizador:

```ruby
config.add_autoload_paths_to_load_path = false
```

That may speed legit `require` calls a bit, since there are less lookups. Also, if your application uses [Bootsnap](https://github.com/Shopify/bootsnap), that saves the library from building unnecessary indexes, and saves the RAM they would need.
Isso pode acelerar um pouco as chamadas `require` legítimas, uma vez que há menos pesquisas. Além disso, se seu aplicativo usa [Bootsnap](https://github.com/Shopify/bootsnap), isso evita que a biblioteca crie índices desnecessários e economiza a RAM necessária.


Reloading
Expand Down