The tag file - is this necessary in production Moodle?

The tag file - is this necessary in production Moodle?

av Kent Parker -
Antal svar: 10

Quote from Martin Dougiamas, 2003:

"For those who've never used tags before, it's a very fast way of jumping around code. You place the cursor over a function call and hit Ctrl-] to jump directly to that function. Ctrl-T brings you back again. You can jump several steps away and return one step at a time. The tags file is just an index to keep things fast."

I gather from this that the tag file is part of Moodle development rather than the running.  I have disabled my tag file and Moodle works just fine, or is it working slower and I haven't noticed yet?

The reason I ask is that this file is rather large in version 1.5.3 (2.8 Mbytes) and I am always mindful of space on my server.

Many thanks

Genomsnitt av betyg: -
Som svar till Kent Parker

Re: The tag file - is this necessary in production Moodle?

av Jan Dierckx -

Yes, you can safely delete the tags file. It is not needed for running Moodle (but is immensely useful when you want to jump around from function to function to find out how Moodle works) Having it around (or for that matter not having it around) doesn't impact Moodle's performance.

I hadn't noticed it was that big in Moodle 1.5.3. In Moodle 1.6 the tags file is only 800 Kb.

Som svar till Kent Parker

Re: The tag file - is this necessary in production Moodle?

av Joseph Rézeau -
Bild på Core developers Bild på Particularly helpful Moodlers Bild på Plugin developers Bild på Testers Bild på Translators
Kent >You place the cursor over a function call and hit Ctrl-] to jump directly to that function. Ctrl-T brings you back again.

I have no idea what this means. In which PHP development environment are you able to do this Ctrl-] and Ctrl-T jumping?surprise

Joseph
Som svar till Joseph Rézeau

Re: The tag file - is this necessary in production Moodle?

av Jan Dierckx -

As far as I know only vim and emacs support the tags file. The instructions about using Ctrl-] and Ctrl-T are for vim.

In vim you can also use the command :tag get_record to find functions like get_record, get_records, get_records_sql, etc...

Place the cursor over a variable, hit * and the variable is highlighted in your complete file.

Vim is incredibly useful, but unfortunately it has a very steep learning curve. Vim uses different modes. Very confusing when I started using it, but now I like it because it means less switching from mouse to keyboard and back.

There are some projects which try to make vim more userfriendly. Cream for Vim is one of them. I don't know if you can use the tags functionality in this simplified versions of vim.

Here is the original post which explained how to lookup functions using the tags file included with Moodle (which made me look at vim in the first place) and here is some more information

Som svar till Jan Dierckx

Re: The tag file - is this necessary in production Moodle?

av Joseph Rézeau -
Bild på Core developers Bild på Particularly helpful Moodlers Bild på Plugin developers Bild på Testers Bild på Translators
Thanks Jan,
I'm not sure I want to take up a "steep learning curve" right nowsad. But thanks for the info anyway.
Joseph
Som svar till Joseph Rézeau

Re: The tag file - is this necessary in production Moodle?

av Jan Dierckx -

Yes, it really takes some weeks to get used to vim. blandade

Just thought I should mention that some less arcane editors also seem to support the tags file:

  • jEdit has a plugin to support such a tags file as is included by Moodle.

  • UltraEdit has built in support for a tags file

I have never actually used any of these, so I can't really say how good they are. Anyone using these editors?

Som svar till Jan Dierckx

Re: The tag file - is this necessary in production Moodle?

av Kent Parker -

Yes, in version 1.5.3, the tags file is 2.8 Mb, which is a lot of file.  It seems odd to me that it is distributed with the package when it is only of use to people who are developers and have gone through a steep learning curve with Vim.  Anyway I know now to delete it,

Thank-you

Som svar till Kent Parker

Re: The tag file - is this necessary in production Moodle?

av Martin Dougiamas -
Bild på Core developers Bild på Documentation writers Bild på Moodle HQ Bild på Particularly helpful Moodlers Bild på Plugin developers Bild på Testers
I'm not sure how the tags file got so big, it may contain all of contrib as well by accident

I've rebuilt it in STABLE CVS and it's back down to 800k (and compresses really well).

It's extremely useful to have it there, I use it on practially every installation I run.
Som svar till Martin Dougiamas

Re: The tag file - is this necessary in production Moodle?

av Kent Parker -

It doesn't sound so easy to use though.mixed

Som svar till Kent Parker

Re: The tag file - is this necessary in production Moodle?

av Martin Dougiamas -
Bild på Core developers Bild på Documentation writers Bild på Moodle HQ Bild på Particularly helpful Moodlers Bild på Plugin developers Bild på Testers
No-one's saying you have to use it. It's for developers editing or navigating Moodle code using vim or emacs ... if that's not you then just ignore it or delete it. blinkning
Som svar till Martin Dougiamas

Re: The tag file - is this necessary in production Moodle?

av Kent Parker -

Thanks, Martin

I think I'll be deleting it. 

Moodle is a great piece of software and the vibe you've got going here is fantastic.  You are to be congratulated.

Kent