---In fc-solve-discuss_at_yahoogroups.com, <shlomif_at_...> wrote :
> Hi Theodore (Pringle) and all!
> Happy holidays.
> I noticed when dealing with Imp3.txt in this repo -
> https://bitbucket.org/shlomif/freecell-pro-3fc-dealshttps://bitbucket.org/shlomif/freecell-pro-3fc-deals - that adding a single
> deal index to the middle of the file, and committing resulted in git consuming
> 90% of my RAM and taking a very long time and later pushing many 10s of
> megabytes of changes. I hate to be a slave of our tools but since I doubt we
> can find a VCS that can handle this better, I decided to split Imp3.txt into
> ranges here:
I also had this problem. The only thing that worked for me was to delete the file and then add the updated version.
> Here is the script I used which is kinda slow but gets the job done. I'd also
> like to write a test suite for the integrity of the data. Is that acceptable to
> you?
Yes.
> Regards,
> Shlomi Fish
> #!/usr/bin/perl
> use strict;
> use warnings;
> use Path::Tiny qw/ path /;
> open my $in, '<', 'freecell-pro-3fc-deals/Imp3.txt';
> my $old_fn;
> my $fh;
> while (my $l = <$in>)
> {
> my $z = sprintf("%010d", int $l);
> my $fn = "freecell-pro-3fc-deals--split/Imp3/" . substr($z, 0, 3) . "XXXXXXX.txt";
> if ($fn ne $old_fn)
> {
> $old_fn = $fn;
> $fh = path($fn);
> }
> $fh->append($l);
> }