Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9070643
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T17:43:58+00:00 2026-06-16T17:43:58+00:00

Working on a tiny script that references data between users. Each user has a

  • 0

Working on a tiny script that references data between users. Each user has a certain count for a “feature”. For instance, feature A is (sad,happy,angry) and feature B is (sunny,clouded,thunder). The current row count of these features altogether is 200.000 for 1000 users. The algorithm is simple: for each users, count the features, calculate per feature which entry is the highest (A -> sad, B -> thunder) and make that a percentage of the total count of features per user. What I got now is a “rating” for a user, which I compare to all the users in the database (yes, by doing that all over again). Based on the assumption that highest feature + highest feature + highest feature etc. for all users, compared with all users, gives some sort of relative similarity between users.

The thing is, I’m doing this with PHP on a 4-core Xen instance from Linode. It’s not very fast. Currently maxing out one core, the other for 30% and the rest sits idle. The script can be optimized, but I really want to figure out how to make the setup so that it goes faster. What kind of architecture do I need for this?

I can see that is a very broad question, but I hope someone can give me some pointers. Any help is greatly appreciated!

Kind regards,

Reinder

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T17:43:59+00:00Added an answer on June 16, 2026 at 5:43 pm

    I found out that the culprit was mysqli->fetch_assoc(), waiting for the harddisk to provide PHP with additional resources. I made the process faster by fetching all the results from the database in one go, and then processing them, instead of a one-by-one fetch-process mechanism.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Requirements: tiny WinForms client app (C# 4.0, WinForms or WPF) a few users working
I'm working in tiny project that deal with multiple file uploading. at the begining
I'm busy working on a project that has a main page, on that main
I'm writing a tiny program that takes user input using Getops, and based on
I am working on a tiny tiny application that just uploads a file to
I wonder why the below tiny script is now working. I created dfFile under
I'm working with the very-useful ID3 framework in my cocoa project. There's one tiny
Working with an undisclosed API, I found a function that can set the number
my actual problem is that .live() jQuery method is not working. This si the
I'm working on a tiny web library and wonder wheter I should call the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.