See relative plugin sizes

Just throw this into a tid. No, don’t fuzz. You can delete it after. I said no fuzz, just do it.

<$let coresize={{{ [[$:/core]get[text]length[]] }}}>
<table class="relativesize">
<tr><th>Size relative to the core plugin</th><th>kb</th><th>%</th></tr>
<tr>
<td>core</td>
<td><$text text={{{ [<coresize>divide[1000]round[]] }}}/></td>
<td>100</td>
</tr>
<$list filter='[all[tiddlers]has[plugin-type]!is[draft]!title[$:/core]]  :sort:number[get[text]length[]] +[reverse[]]'>
<tr>
<td><$link/></td>
<td>
<$text text={{{ [all[current]get[text]length[]divide[1000]round[]] }}}/>
</td>
<td>
<$text text={{{ [all[current]get[text]length[]] +[divide<coresize>multiply[100]fixed[1]precision[1]] }}}/>
</td>
</tr>
</$list>
</table>
</$let>

<style>
table.relativesize td:not(:first-child) {text-align:right}
</style>
3 Likes

Very useful. I just changed the line shows relative size as below:

<$text text={{{ [all[current]get[text]length[]] +[divide<coresize>multiply[100]fixed[2]pad[5]] }}}/>

1 Like

@twMat great work, thanks!
@Mohammad this change fixes the formatting issues of the original. Without it, percentages between 10 and 100 are shown in exponential notation e.g. 1e+1 instead of 10.

You may have a look at https://talk.tiddlywiki.org/t/a-kiss-template-to-calculate-the-size-of-tiddlers-and-plugins/5444 to get a more exact value.