Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

memory improvement #74

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

memory improvement #74

wants to merge 1 commit into from

Conversation

majick777
Copy link

explode line crashed the script on my install, which made me realize it is very memory intensive on a large file like this.
instead my alternative is to write the file and use fgets to process it line by line. (hopefully doesn't affect the regex?)

explode line crashed the script on my install, which made me realize it is very memory intensive on a large file like this.
instead my alternative is to write the file and use fgets to process it line by line. (hopefully doesn't affect the regex?)
@mimmi20
Copy link

mimmi20 commented Aug 17, 2015

@majick777 Could you check this with the Project browscap/brpwscap-php as well? browscap/browscap-php is the successor of this project and better maintained.

Please also check the following things:

  • You need write access to the cache dir
  • You need a lot of Memory to create the cache (>= 256MB)
  • Is there any error in your error log?

@majick777
Copy link
Author

ah sorry just saw I never got back to this have been too busy to check or log it on the other project... just on those notes you mentioned:

  • write access is fine as I did test writes to the directory at the time
  • tested on my VPS hosting with 4gb memory and 256M limit
  • no error whatsoever in the log at the time which is what made me curious, it simply crashed at the explode line which I thought was strange...
    ...it is probably a memory thing which is why I logged this to begin with, I can't test the difference in memory usage myself as it crashed but I think it would be quite significant and allow users with much less memory available to compile updates.
    ... will test again when I can.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants