Skip to content

Import global symbols #4890

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

Closed

Conversation

paulbalandan
Copy link
Member

Description
This is the result of the internal discussion whether to import global symbols (classes, functions, constants) or to fully prepending them with T_NS_SEPARATOR.

This PR imports all internal global symbols to speed up scope resolution. Take note that this imports only the native/internal symbols. This means that this does not import user-defined constants and functions exposed to the global namespace.

Linebreaks separating imports of classes, constants and functions are manually added in accordance with PSR-12.

Checklist:

  • Securely signed commits

@paulbalandan paulbalandan force-pushed the import-global-symbols branch from 5a9877b to a1d9b72 Compare June 28, 2021 16:38
@paulbalandan
Copy link
Member Author

Not sure what happened here. 🤔

@paulbalandan paulbalandan force-pushed the import-global-symbols branch from a1d9b72 to 1af6535 Compare June 29, 2021 15:45
@MGatner
Copy link
Member

MGatner commented Jul 1, 2021

I know this was what we agreed on, but seeing it in action makes me realize: this is a lot of extra lines. I wonder if at some point there is a diminishing return between the scoping performance gains versus the overall line and file size of the framework? We should calculate the difference and maybe look into running some benchmarks against both versions.

@paulbalandan paulbalandan mentioned this pull request Jul 13, 2021
1 task
@paulbalandan paulbalandan force-pushed the import-global-symbols branch 2 times, most recently from c0c06da to 4a985fc Compare July 30, 2021 16:00
@paulbalandan paulbalandan force-pushed the import-global-symbols branch from 4a985fc to 2ab9ab1 Compare July 30, 2021 16:39
@paulbalandan paulbalandan added the blocked Blocked for merge approval by an issue or other PR label Sep 12, 2021
@paulbalandan
Copy link
Member Author

Closing this for now. The cost of resolving merge conflicts and maintaining PR up to date with latest develop is way too much than its perceived benefits. I can just recreate this when the time comes.

@paulbalandan paulbalandan deleted the import-global-symbols branch January 20, 2022 18:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked Blocked for merge approval by an issue or other PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants