Skip to content
This repository has been archived by the owner on Nov 2, 2021. It is now read-only.
/ PreProcessor Public archive

[deprecated] Scripts used to optimise PocketMine-MP before building phars

Notifications You must be signed in to change notification settings

pmmp/PreProcessor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PreProcessor

Scripts used to optimise PocketMine-MP before building phars.

These scripts are used by Jenkins to optimize PocketMine-MP source code in production phars.

PreProcessor.php

This script uses the C preprocessor to pre-process PocketMine-MP source code before it is packaged into a phar. The headers in the rules/ directory define C macros which are used to preprocess the code and optimize it for use in production.

Arguments

  • path: Path to the PocketMine-MP source code to optimize.
  • multisize: Whether to produce multiple optimized code versions with optimizations specific to 64-bit or 32-bit platforms. Where applicable, multiple versions of target source files will be produced with different optimizations (for example, Player__64bit.php, Player__32bit.php). The autoloader in PocketMine-MP will then decide which version of the source file to load at runtime based on the platform.

CodeOptimizer.php

This script performs basic optimization of constant references and function calls by adding backslashes (\) in front of global constant references and function calls.

Arguments

  • path: Path the the PocketMine-MP source code to optimize.

About

[deprecated] Scripts used to optimise PocketMine-MP before building phars

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •