prometheus-lua / Prometheus

Lua Obfuscator written in pure Lua
https://levno-710.gitbook.io/prometheus/
GNU Affero General Public License v3.0
202 stars 60 forks source link

Add better `getPosition` implementation #143

Closed NougatBitz closed 10 months ago

NougatBitz commented 10 months ago

getPosition Heavily decreased the performance due to using the gsub function. This change decreased the parsing time of a 27kb file from 4.35 seconds to just 0.1 seconds. getPosition also behaved incorrectly as is returned the wrong line position.

Before: Before

After: After

Efficiency increase: Efficiency increase

levno-710 commented 10 months ago

Looks great, I will merge this.