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

Some improvments v2 ? #3

Open
ghost opened this issue May 13, 2012 · 0 comments
Open

Some improvments v2 ? #3

ghost opened this issue May 13, 2012 · 0 comments

Comments

@ghost
Copy link

ghost commented May 13, 2012

I had some problem witch you script eq 30 second freeze

  • Why every 5 millisecond connect to mongodb and check for lock
    So i use wincache can be changed to APC to store lock $ID, and add expire
  • Some fix witch names etc only for my script
    Too bad is not ->limit in mongodb when remove _gc
  • Index only are create once when server start

ADD background an unique

$this->_mongo->ensureIndex(array('_id' => true),array('background' => true, 'unique' => true ));

  • _write -> add "upsert" => true
  • When read data -> get only filed 'D' witchout _id or other array('d' => 1,'_id' => 0 )

FULL code

https://gist.github.com/2670252

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

No branches or pull requests

0 participants