Jump to content

Compare and get the difference/add


Recommended Posts

Hello,

I'll explain. I'm donwloading a very big CSV, not in size (is less than 500kb) but has many lines (5000+)

I'll take this CSV and convert to a multidimensional array, and this operation require some time. Pratically the link is static, so thay never change, and this CSV is updated often. The value are in order, so the last added are from line 1 (line 0 is the column)

Since i don't what to re-create the array from zero every time, how i can get only the difference from the CSV/Array in memory and the "new" CSV", and the put the difference inside the array?

Thanks

Edited by Terenz

Nothing is so strong as gentleness. Nothing is so gentle as real strength

 

Link to comment
Share on other sites

I think I understand your issue.  You have small (it is not big at 500kb) .csv file. You want to add the new rows into a container (could be an array), which come after the old rows.  So currently you are grabbing all rows every time to skip old ones, until you find new rows. Right ?  You are currently using FileReadtoArray ?

If all my assumptions are true, there are easy ways to increase speed.  But you will have to provide your current script, along with some example of the csv files...

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...