Author Topic: Odd discrepancy in File sizes (sparse/zstd)  (Read 1286 times)

Offline JonB256

  • Hero Member
  • *****
  • Posts: 832
    • View Profile
    • My Christmas Website
Odd discrepancy in File sizes (sparse/zstd)
« on: January 04, 2021, 11:16:42 AM »
I've noticed a few sequences where the FSEQ file, transferred using FPP Connect and sparse/zstd, where the Sparse file is actually larger than the "full sized" FSEQ file on my xLights PC.

For example, a new file using a lot of shaders, and outputting to a large P5 panel (48 panels), the file size on the PC is 152.4MB and the sparse file on the P5 panel is 187.6MB

There are 2 or 3 others like that, though most of the time, the Remote's sparse/zstd files are noticeably smaller.

Anyone else noticed this? Is it perhaps a zstd compression anomaly where the full FSEQ compresses better than the sparse file?  In which case, shouldn't I just use the smaller file?

Going down the list, I found two more of note, both of the Xlights Around the World songs
Christmas Every Day - 312MB on PC, 516MB on P5 Remote
2019 XLAW (Drummer Boy) - 618MB on PC, 733MB on P5 Remote
« Last Edit: January 04, 2021, 11:38:21 AM by JonB256 »

Offline dkulp

  • Supporting Member
  • Hero Member
  • *
  • Posts: 812
    • View Profile
Re: Odd discrepancy in File sizes (sparse/zstd)
« Reply #1 on: January 04, 2021, 02:42:49 PM »
It has to do with the compression levels that are selected.   When creating the sparse file for the FPP instance, it will adjust the compression level depending on that target.   For example, the PiZeros have a REALLY crappy single core CPU so we set the compression level down to "-5" which significantly reduces the CPU usage for decompression, but does result in larger files compared to the default of "2" for xLights normal save.     Beagles, again due to single core, get a reduced compression level if the channel count is high, but not for smaller channel counts.
Daniel Kulp
Framingham, MA

Offline allknowing2012

  • Sr. Member
  • ****
  • Posts: 386
    • View Profile
Re: Odd discrepancy in File sizes (sparse/zstd)
« Reply #2 on: January 04, 2021, 05:40:37 PM »
Dan with that in mind would it make sense to always use sparse even if you have just one player - so the targeted compression is "better" for the destination?

Offline jnealand

  • Hero Member
  • *****
  • Posts: 1421
    • View Profile
Re: Odd discrepancy in File sizes (sparse/zstd)
« Reply #3 on: January 04, 2021, 06:57:40 PM »
Why would you not use sparse?  Sparse also only sends data for that particular controller and not for all controllers.
Jim Nealand
Kennesaw, GA

Offline allknowing2012

  • Sr. Member
  • ****
  • Posts: 386
    • View Profile
Re: Odd discrepancy in File sizes (sparse/zstd)
« Reply #4 on: January 04, 2021, 07:19:17 PM »
if you have standalone/one pi the default has often been suggested to just use v2.  (perhaps because of bugs at one point?)

Offline JonB256

  • Hero Member
  • *****
  • Posts: 832
    • View Profile
    • My Christmas Website
Re: Odd discrepancy in File sizes (sparse/zstd)
« Reply #5 on: January 04, 2021, 09:03:33 PM »
It has to do with the compression levels that are selected.   When creating the sparse file for the FPP instance, it will adjust the compression level depending on that target.   For example, the PiZeros have a REALLY crappy single core CPU so we set the compression level down to "-5" which significantly reduces the CPU usage for decompression, but does result in larger files compared to the default of "2" for xLights normal save.     Beagles, again due to single core, get a reduced compression level if the channel count is high, but not for smaller channel counts.
Dan, that makes perfect sense. But, the reason I even looked at the file sizes is that for one of my sequences, the Sparse file is not compressing correctly. About 20 seconds from the end, the P5 panel just freezes. When I use the full FSEQ, it plays just fine. So for now, I'm just using the full file, not the Sparse one.