Artifact
3ed9ab4cd824676d5ce24e4bdc8056242b41a4067ef713c1b04f2d76901c4ebb:
Ticket change
[3ed9ab4cd8]
- New ticket
[93eb73784ae4c3b2|93eb73784a] <i>zipfs interaction with tcl_findLibrary causes slow loading</i>.
by
juliannoble2 on
2023-09-05 20:12:12.
D 2023-09-05T20:12:12.813
J assignee nobody
J closer nobody
J cmimetype text/x-fossil-plain
J comment Loading\sTk\son\swindows\s(non-tclkit)\scan\sbe\sexcruciatingly\sslow.\se.g\s5+\sseconds\s\r\nThe\sslow\sloading\soccurs\swithin\stcl_findLibrary\r\n\r\n(related\sbut\sdifferent\scode\spath\s-\sif\sthe\stcl8.7\slibrary\sfiles\saren't\sinstalled\s-\sTcl_Init\sseems\sto\stake\sa\slong\stime\sbefore\seventually\sloading\ssuccessfully\sfrom\stcl87.dll)\r\n\r\nThis\sappears\sto\sbe\sa\scombination\sof\sbugs/isues.\s\r\n\r\n1)\szipfs\sexists\s$filename\s\salways\sreturns\s0\swhen\sprefixed\swith\sthe\sZIPFS_VOLUME\s"//zipfs:/"\sbut\scan\sbe\sused\sif\sthe\sprefix\sis\sdropped\se.g\r\n\r\n\s\s\s\s%\szipfs\smount\r\n\s\s\s\s//zipfs:/lib/tk\sC:/tcl87/bin/tk87.dll\r\n\s\s\s\s%\szipfs\slist\s//zipfs:/lib/tk/tk_library/tk.*\r\n\s\s\s\s//zipfs:/lib/tk/tk_library/tk.tcl\r\n\s\s\s\s%\szipfs\sexists\s//zipfs:/lib/tk/tk_library/tk.tcl\r\n\s\s\s\s0\r\n\s\s\s\s%\szipfs\sexists\s/lib/tk/tk_library/tk.tcl\r\n\s\s\s\s1\r\n\r\nI\snotice\sthe\sandrowish\szipfs\simplementation\s(which\sis\sdiverging\sin\sinteresting\sways\sas\snoted\sin\san\searlier\sticket)\shas\sfixed\sthis\sso\sthat\sit\sis\sconsistent\swith\sfor\sexample\s'zipfs\sinfo'\swhich\srequires\sthe\sprefix.\s\r\n\r\n2)\stcl_findLibrary\sis\susing\szipfs\sexists\swith\sthe\sprefix\sso\salways\sreturns\szero.\r\nThis\smeans\sthe\szipfs\sis\smounted\sok\s-\sbut:\r\n\r\n\s\smount\sis\scalled\stwice\swith\sdifferent\scapitalisations\sof\sdriveletter\r\n\r\n\s\scatch\s{zipfs\sunmount\s$archive}\s\sis\scalled\safter\sthe\sfirst\smount\s-\swhich\sdoes\snothing\sbecause\s$archive\sis\sthe\swrong\sargument\shere\s-\sit\sshould\sbe\sthe\smountpoint\snot\sthe\sname\sof\sthe\szip\sfile\s\r\n\r\n(no-args\serror\smessage\sfrom\szipfs\sunmount\sis\smisleading\sin\sthis\sregard)\r\n\r\n\s\s\s\sThe\ssecond\smount\swill\sfail\sbecause\sthe\sfirst\sone\sis\sstill\sin\splace\s-\sbut\sit's\swrapped\sin\sa\sbig\scatch\sso\sthings\sgo\son.\r\n\r\n\r\n3)\sbad\sinteraction\swith\stcl's\s'file\sexists'\r\ntcl_findLibrary\snow\shas\sa\slist\sof\spaths\sto\scheck\s-\ssome\sof\swhich\sbegin\swith\s//zipfs:/\s\sothers\sfrom\sthe\sexternal\sfilesystem\r\n\r\n\s\sPresumably\sbecause\s//zipfs:/\s\slooks\sroughly\slike\sa\sUNC\spath:\r\n\r\n\s\sfile\sexists\s//zipfs:/somewhere\r\n\r\n\s\swill\sbe\svery\sslow\s-\son\sthe\sorder\sof\sseconds,\swhen\sthe\spath\sdoesn't\sexist.\r\n\s\s\r\n\s\s(file\sexists\son\sa\s//zipfs:/\spath\swhich\sis\smounted\sand\sexists\sis\sfine)\r\n\r\nThis\sproblem\swith\sfile\sexists\s-\swhilst\sat\sthe\score\sof\sthe\sdelay\s-\scould\sbe\sworked\saround\sif\sthe\s'zipfs\sexists'\sissue\swas\sfixed\sas\sthis\scould\sbe\sused\sfor\sfast\stesting\sof\sthose\spaths.\r\n\r\nOnce\s//zipfs:/\spaths\sare\smounted\s-\sthey\sperform\swell\son\swindows\s(faster\sthan\sreading\sequivalent\sfiles\sfrom\sinstalled\sfiles)\r\n\r\nThere\sis\san\sinconsistency\sbetween\stcl\swith\slibrary\sfiles\sresulting\sin\sno\s//zipfs:/\smount\r\n\r\nand\sTk\swith\slibrary\sfiles\sinstalled\sresults\sin\sthem\sbeing\saccessed\sfrom\sthe\s//zipfs:/\smount\r\n\r\nIn\ssummary:\r\nTcl\sloading\sis\sslow\swithout\slibs\sinstalled\s-\sTk\sloading\sis\sslow\swhether\sthey're\spresent\sor\snot.\r\n\r\nGiven\sthe\sperformance\sboost\sfrom\s//zipfs:/\smounts\s-\sit\smay\smake\ssense\sto\salways\sload\sfrom\sthe\sdlls\sin\stclsh/wish\swhen\savailable\seven\sif\suser\shas\sinstalled\sthe\slibs\s-\sas\spresumably\sthey\scan\suse\sthe\srelevant\senvironment\svar\sto\sforce\sloading\sfrom\sthe\sfilesystem\sif\srequired\s(untested).
J foundin 8.7
J is_private 0
J login juliannoble2
J priority 5\sMedium
J private_contact 957fdfcd8744611e3fe1f4896c7538b1d9bf47b2
J resolution None
J severity Important
J status Open
J submitter juliannoble2
J subsystem 37.\sFile\sSystem
J title zipfs\sinteraction\swith\stcl_findLibrary\scauses\sslow\sloading
J type Bug
K 93eb73784ae4c3b2285133a98df8163144eba291
U juliannoble2
Z c24f362ef1aba32d900ef6016d23e3a6