Originally created by @ashm-dev on GitHub (Feb 6, 2025).
Description
Hello!
I would like to propose two enhancements to improve performance and simplify the codebase:
Proxy Configuration via Environment Variables
Enable the ability to configure proxies through environment variables, for example: PROXY=protocol://ip:port
Global Request Sessions
Implement global sessions for both aiohttp and requests. This approach would offer several advantages:
Connection Reuse:
Reusing the TCP connection pool will reduce the overhead of establishing new connections, thereby speeding up request processing.
Centralized Configuration:
Managing session settings (such as headers, timeouts, proxies, etc.) in a single location simplifies maintenance and ensures consistency across the application.
Code Simplification:
A global session reduces the need to repeatedly initialize and manage individual sessions, leading to cleaner and more maintainable code.
Benefits
Improved Performance:
By reusing TCP connections, the application can handle requests more efficiently.
Easier Maintenance:
Centralizing session configurations simplifies adjustments and reduces the risk of inconsistencies.
Reduced Code Complexity:
Fewer session initializations and closures make the codebase easier to understand and maintain.
Thank you for considering this proposal!
Originally created by @ashm-dev on GitHub (Feb 6, 2025).
#### Description
Hello!
I would like to propose two enhancements to improve performance and simplify the codebase:
1. **Proxy Configuration via Environment Variables**
Enable the ability to configure proxies through environment variables, for example: `PROXY=protocol://ip:port`
2. **Global Request Sessions**
Implement global sessions for both aiohttp and requests. This approach would offer several advantages:
- **Connection Reuse:**
Reusing the TCP connection pool will reduce the overhead of establishing new connections, thereby speeding up request processing.
- **Centralized Configuration:**
Managing session settings (such as headers, timeouts, proxies, etc.) in a single location simplifies maintenance and ensures consistency across the application.
- **Code Simplification:**
A global session reduces the need to repeatedly initialize and manage individual sessions, leading to cleaner and more maintainable code.
#### Benefits
- **Improved Performance:**
By reusing TCP connections, the application can handle requests more efficiently.
- **Easier Maintenance:**
Centralizing session configurations simplifies adjustments and reduces the risk of inconsistencies.
- **Reduced Code Complexity:**
Fewer session initializations and closures make the codebase easier to understand and maintain.
Thank you for considering this proposal!
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @ashm-dev on GitHub (Feb 6, 2025).
Description
Hello!
I would like to propose two enhancements to improve performance and simplify the codebase:
Enable the ability to configure proxies through environment variables, for example:
PROXY=protocol://ip:portImplement global sessions for both aiohttp and requests. This approach would offer several advantages:
Reusing the TCP connection pool will reduce the overhead of establishing new connections, thereby speeding up request processing.
Managing session settings (such as headers, timeouts, proxies, etc.) in a single location simplifies maintenance and ensures consistency across the application.
A global session reduces the need to repeatedly initialize and manage individual sessions, leading to cleaner and more maintainable code.
Benefits
By reusing TCP connections, the application can handle requests more efficiently.
Centralizing session configurations simplifies adjustments and reduces the risk of inconsistencies.
Fewer session initializations and closures make the codebase easier to understand and maintain.
Thank you for considering this proposal!