Skip to content

osn-selenium v1.0.0-beta.9

Pre-release
Pre-release

Choose a tag to compare

@oddshellnick oddshellnick released this 25 Jan 04:09
· 5 commits to dev since this release

osn-selenium v1.0.0-beta.9 - Performance Optimization and Core Refactoring

This beta release focuses on significant internal architecture improvements, aimed at reducing library overhead, accelerating startup times, and streamlining dependencies. We have moved away from heavy data-processing libraries in favor of a leaner, more specialized stack while optimizing how Chrome DevTools Protocol (CDP) domains are initialized.

Key Improvements in v1.0.0-beta.9:

  1. Lazy Initialization of CDP Executors: Previously, the CDPExecutor initialized all available domain executors (e.g., Network, Page, DOM) immediately upon instantiation. In v1.0.0-beta.9, we have implemented a lazy loading pattern. Domain executors are now only imported and initialized the first time they are accessed via their respective properties. This significantly reduces the initial memory footprint and speeds up the creation of new driver instances.
  2. Removal of Pandas Dependency: To keep the library lightweight, we have completely removed the dependency on Pandas. All internal process tracking and network connection filtering—previously handled via DataFrames—now utilize native Python structures and a new, specialized ExecutablesTableRow model.
  3. Migration to psutil for Process Management: With the removal of Pandas, we have refined our use of psutil. The logic for discovering existing browser sessions and managing executable tables has been rewritten to be more robust and performant, ensuring better cross-platform reliability for session recovery.
  4. Major Package Restructuring: The monolithic _functions.py file has been decomposed into modular components:
    • _args_helpers.py: Logic for recursive wrapping/unwrapping of Selenium elements.
    • _bridges.py: Bridge functions for JS and CDP execution.
    • _executable_tables/: Dedicated module for process management logic.

Putting It All Together:
v1.0.0-beta.9 makes osn-selenium faster to start and easier to install by trimming unnecessary dependencies and optimizing internal executor logic. These changes provide a cleaner foundation for the upcoming modular API and enhanced concurrency features.