2.6 feature request: sameRef()

new topic     » topic index » view thread      » older message » newer message

The background processing in Edita now goes something like this:

for i=1 to length(filetext) do
		for j=1 to length(filetext) do
			if equal(bGpathname,{filepaths[j],filenames[j]}) then
				if equal(text,filetext[j]) then
				end if
			end if
		end for

(The j loop covers the case whereby the file has been moved in the
list, be that because it or one earlier in the list has been closed,
or Ctrl Page Up/Down has changed the file order, between the start and
exit of the Scan() operation, which can take several seconds).

The line:
	if equal(text,filetext[j]) then

actually only cares whether they are still the same reference. If I
had a sameRef() function, I wouldn't need bGpathname at all, plus of
course it would be an instant check rather than a possibly lengthy
compare. That also means I could perform the check inside Scan(), to
quit early if the file has been modified, whereas comparing a 35,000
line win32lib 35,000 times is perhaps not such a good idea.

I don't believe there is any way I could try this in eu.ex?


new topic     » topic index » view thread      » older message » newer message


Quick Links

User menu

Not signed in.

Misc Menu