Author Topic: Ti-Nspire / Ti-Nspire CX Indexing  (Read 5235 times)

0 Members and 1 Guest are viewing this topic.

Offline MasterGeek

  • LV2 Member (Next: 40)
  • **
  • Posts: 24
  • Rating: +0/-0
    • View Profile
Ti-Nspire / Ti-Nspire CX Indexing
« on: January 20, 2013, 02:27:27 pm »
I was wondering how the Ti-Nspire / Ti-Nspire CX accesses files when you open the document screen. Does it keep an up to date "database" of files and their file sizes or does it re-scan the file sizes and locations every time?

If the Ti-Nspire / Ti-Nspire CX re-scans every time, maybe it would be possible to create a ndless 3.1 program that would take control and make it so people with a lot of files can quickly open their My Documents folder.


Just an idea.
« Last Edit: January 20, 2013, 03:00:06 pm by MasterGeek »

Offline Levak

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1002
  • Rating: +208/-39
    • View Profile
    • My website
Re: Ti-Nspire / Ti-Nspire CX Indexing
« Reply #1 on: January 20, 2013, 03:00:57 pm »
Does it keep an up to date "database" of files and their file sizes or does it re-scan the file sizes and locations every time?
It re-scans it every single time you access the My Documents screen from the Home screen.
The longest is to build the overall screen with multi-depth objects with multiple sons etc ...
This should not be as long as it is, so I guess it tries to open the files (I did not checked, its a pure supposition), but for what ?
« Last Edit: January 20, 2013, 03:01:49 pm by Levak »
I do not get mad at people, I just want them to learn the way I learnt.
My website - TI-Planet - iNspired-Lua

Offline MasterGeek

  • LV2 Member (Next: 40)
  • **
  • Posts: 24
  • Rating: +0/-0
    • View Profile
Re: Ti-Nspire / Ti-Nspire CX Indexing
« Reply #2 on: January 20, 2013, 03:09:07 pm »
It may be possible to make a background ndless program that takes control of file saving. Instead of re-scanning each time, the program could keep a small database that would contain all the information already. When ever you entered the My Documents screen it would query the database instead of re-scanning. The program would only update the database when it detected that a file had been changed, and then it would only update the file that has been changed. Dunno how it would handle ndless programs file saving though. Please tell me if this would work, I'm new to Ti-Nspire /Ti-Nspire CX development.
« Last Edit: January 20, 2013, 03:10:23 pm by MasterGeek »

Offline excale

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 103
  • Rating: +19/-1
    • View Profile
Re: Ti-Nspire / Ti-Nspire CX Indexing
« Reply #3 on: January 20, 2013, 04:16:41 pm »
The program would only update the database when it detected that a file had been changed, and then it would only update the file that has been changed.

How would it detect a file had been changed/removed/added ?

Offline ruler501

  • Meep
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2475
  • Rating: +66/-9
  • Crazy Programmer
    • View Profile
Re: Ti-Nspire / Ti-Nspire CX Indexing
« Reply #4 on: January 20, 2013, 04:18:17 pm »
My guess is you'd have it check hashes or something like that every once in a while
I currently don't do much, but I am a developer for a game you should totally try out called AssaultCube Reloaded download here https://assaultcuber.codeplex.com/
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCM/CS/M/S d- s++: a---- C++ UL++ P+ L++ E---- W++ N o? K- w-- o? !M V?
PS+ PE+ Y+ PGP++ t 5? X R tv-- b+++ DI+ D+ G++ e- h! !r y

Offline Levak

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1002
  • Rating: +208/-39
    • View Profile
    • My website
Re: Ti-Nspire / Ti-Nspire CX Indexing
« Reply #5 on: January 20, 2013, 05:37:41 pm »
This is the simplest way to do :
A global variable "modified" (flag)
A hook that sets "modified" to 1 in every single place in the OS that modifies the folders content.
A hook in the call_doc_brower in order to have it in a singleton that checks "modified". If set to 1, re-scan everythin like TI does. If 0, just return the current content.
« Last Edit: January 20, 2013, 05:38:16 pm by Levak »
I do not get mad at people, I just want them to learn the way I learnt.
My website - TI-Planet - iNspired-Lua

Offline MasterGeek

  • LV2 Member (Next: 40)
  • **
  • Posts: 24
  • Rating: +0/-0
    • View Profile
Re: Ti-Nspire / Ti-Nspire CX Indexing
« Reply #6 on: January 20, 2013, 07:33:05 pm »
Would anyone be willing to actually make this? If so could it have an options menu where you can turn it off? (Just in case of conflicts with other ndless apps)
« Last Edit: January 20, 2013, 09:01:17 pm by MasterGeek »

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: Ti-Nspire / Ti-Nspire CX Indexing
« Reply #7 on: January 21, 2013, 01:02:07 am »
You can also use HideManager. This places the documents and folders you want in a "hidden" folder that the OS will not check, and ingame browser still can access them. For example, I had a lot of gba games (with their save files that constitued approximately 30 files), hid them, and the My document opening time went from 9 seconds to 2 seconds.
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s

Offline MasterGeek

  • LV2 Member (Next: 40)
  • **
  • Posts: 24
  • Rating: +0/-0
    • View Profile
Re: Ti-Nspire / Ti-Nspire CX Indexing
« Reply #8 on: January 21, 2013, 01:38:58 pm »
I tried that, it didn't speed it up that much. :( Probably because I have WAY too many files.

Offline Levak

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1002
  • Rating: +208/-39
    • View Profile
    • My website
Re: Ti-Nspire / Ti-Nspire CX Indexing
« Reply #9 on: January 21, 2013, 01:52:15 pm »
I tried that, it didn't speed it up that much. :( Probably because I have WAY too many files.
I think you did not launched hide.tns, did you ?
If the /hidden/ directory is not visible, then try to put more stuff you don't usually use in that directory ...
I do not get mad at people, I just want them to learn the way I learnt.
My website - TI-Planet - iNspired-Lua

Offline MasterGeek

  • LV2 Member (Next: 40)
  • **
  • Posts: 24
  • Rating: +0/-0
    • View Profile
Re: Ti-Nspire / Ti-Nspire CX Indexing
« Reply #10 on: January 21, 2013, 05:10:51 pm »
I definitely ran hide.tns and i found its "hidden" folder using Ndless Commander so I know its working. I just have like 400 files...
« Last Edit: January 21, 2013, 06:39:12 pm by MasterGeek »