dezlov/PascalTZ

Precompiled tz base.

Opened this issue · 1 comments

In PascalTZ 1.00 the fields storing strings are arrays of chars for 2 reasons, one is speed allocating space and the most important one because I was thinking in store everyting once parsed in a binary file, so all structures can be read from disk in a "flash" instead parsing every rule.

Your code is pretty good in speed, but reading from a binary file should be much faster.

I have considered this when I was refactoring the code, but decided against it by the time I finished refactoring. As you said, parsing is pretty fast as it as. I focused on the stability and efficiency of timezone conversion instead, since this is where most of time will be spent.

Pros:

  • Faster loading of the database.

Cons:

  • Updating of timezone database requires pre-processing (conversion to binary format).
  • Increased complexity due to an intermediary step of having to deal with a binary database (may negatively impact maintenance and debugging).

However, I don't mind keeping it as a future feature.