nigelhorne / ged2site

Create a family tree website from a Gedcom file
https://genealogy.nigelhorne.com
GNU General Public License v2.0
36 stars 4 forks source link

Progressive build for static site #113

Open jhannah opened 1 month ago

jhannah commented 1 month ago

Feature request: Add switch to skip processing of already-existing static-site/ individuals.

With 4,176 people in my GEDCOM, an attempted build of the static site takes 20 minutes. I'm having to iterate lots of data errors in my GEDCOM that are crashing ged2site. Fair enough, but it sure would be nice if I didn't have to wait 20 minutes for it to re-process thousands of individuals that processed fine last time.

It would be great if I modify a specific individual in my GEDCOM, I could just delete that one static-site/ file, run ged2site, and re-generate that one individual in seconds instead of 20 minutes.

With dozens of errors in my GEDCOM I need to fix, it's currently taking hours to iterate through them, one at a time.

✗ time ./ged2site -cFdh 'Jay Weston Hannah' -l ~/Desktop/jay_new.ged
... lots of warnings I need to clean my data to fix ...
[=======2800 of ./ged2site=============================      ]  90% [3790/4176]
    1083 of ./ged2site
BUG: illegal '9 FEB' should have been trapped by now at ./ged2site line 11893, <GEN0> line 33630.
./ged2site -cFdh 'Jay Weston Hannah' -l ~/Desktop/jay_new.ged  930.95s user 133.54s system 95% cpu 18:36.66 total
- program exits -
jhannah commented 1 month ago

Note: WOOT! I finally survived a whole run!! yay! 🎈 🍰 🎉 😃 Progress! 20m 18s elapsed.

nigelhorne commented 3 weeks ago

The difficulty with this is that generating each page will still reference other information (for example to determine who someone may be living with or close to), each page generation is not stateless.

Having said that, any suggestions for speed improvements will be greatly appreciated.

jhannah commented 2 weeks ago

Nod. That's a very valid concern under normal conditions. I was just thinking about some quick next if (-e "I1025.html") for the rare occasions that I'm cycling multiple times against a specific bug on a specific individual 20 minutes deep in re-processing... But I haven't gotten around to attempting to implement that hack. Maybe I never will? No big deal either way. :)

nigelhorne commented 2 weeks ago

I understand - I use a similar hack when testing a specific person next if($person->xref() ne 'foo');