Skip to content
This repository has been archived by the owner on Jun 1, 2022. It is now read-only.

Make autoloading of geoipcity.inc optional #8

Closed
igor84 opened this issue Aug 25, 2013 · 2 comments
Closed

Make autoloading of geoipcity.inc optional #8

igor84 opened this issue Aug 25, 2013 · 2 comments
Labels

Comments

@igor84
Copy link

igor84 commented Aug 25, 2013

Loading of geoipcity.inc adds about 30ms to response time on my Windows 7 machine. For example loading facebook PHP API adds only 5ms to the response time. I know its not a lot but since I only need geoip.inc for countries it would be nice if I could only include geoipcity.inc if I really need it. You could maybe put in your documentation that if user wants this he should add it to his composer.json autoload section.

@oschwald
Copy link
Member

I think we want our default behavior to autoload both files. If you only need geoip.inc and the time to load the code is an issue for your setup, I would recommend not using composer to load the file.

I think the underlying issue is how the regions are loaded, which could be done lazily, but I don't think we will fix that ourselves given that GeoIP2 will be fully released soon.

@agamm
Copy link

agamm commented Aug 26, 2013

I also had some problems with the time taken for executing the includes. 20-30 m"s but after enabling APC we got it down by 4-5 times! (e.g. ~5 m"s)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

No branches or pull requests

3 participants