#1 2022-12-16 19:12

jogiwer
Member
From: Germany
Registered: 2022-11-05
Posts: 66

Performance of meta tag extraction

To get some meta tags into the filename there are several ways to implement this as listed here:

To get these information ReNamer (or the used library) needs to scan the files. I wonder if there is an "optimal" way to retrieve multiple tags so that there will be only one call or scan.

  • Will a file be scanned multiple times if one (insert, ...) rule inserts more than one tag?

  • What if there are more than one rule involved? Is it always preferable to do as much as possible in one rule?

  • Will multiple calls to CalculateMetaTag result in multiple scans?

  • If there is any kind of caching involved, will it also come to effect if I mix insert rules and calls to CalculateMetaTag?

  • And what happens if I call CalculateMetaTag with a different filename than the one currently inspected? Will this dirty the caching?

And last:
In a preview run where I'd like to use a meta tag of the first file while working on the second file. What about performance if I compare these two implementations:

  1. Get the meta tag from the current file and store it via SetGlobalVar. Following files could use it with GetGlobalVar.

  2. Just call CalculateMetaTag with the name of the file to scan.

Offline

#2 2022-12-20 15:13

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,370

Re: Performance of meta tag extraction

The rendering of meta tags is currently performed without any optimizations or caching. Each meta tag gets handled completely independently.

The pseudo-code below shows when the meta tags get rendered during a Preview operation.

for every file
  for every rule
    apply rule
    process meta tags
  endfor
endfor

So there is plenty of room for improvement.

Offline

Board footer

Powered by FluxBB