0

Which field is better for displaying code like below? Textarea or editor field ? I'm currently using Textarea I want to know which method is better and will affect the speed of the site

Does anyone have any experience in this field? Whether the speed of the site goes down with this or not??

This code for show changelog product And for each product, the number of lines may be much larger

<div class="logs-wrap">
    <h4>version 1.4</h4>
    <div class="logs-detail">
        <ul>
            <li><span class="issue update joomla"><i class="fa fa-joomla"></i>update</span>update ....</li>
            <li><span class="issue update"><i class="fa fa-refresh"></i>update</span>update....</li>
            <li><span class="issue improve"><i class="fa fa-gear"></i>improve</span>improve design </li>
        </ul>
    </div>
</div>
<div class="logs-wrap">
    <h4>version 1.3</h4>
    <div class="logs-detail">
        <ul>
            <li><span class="issue update"><i class="fa fa-update"></i>update</span>update.....</li>
            <li><span class="issue improve"><i class="fa fa-gear"></i>improve</span>improve speed...</li>
        </ul>
    </div>
</div>
<div class="logs-wrap">
    <h4>version 1.2</h4>
    <div class="logs-detail">
        <ul>
            <li><span class="issue update joomla"><i class="fa fa-joomla"></i>update</span>joomla updated</li>
            <li><span class="issue update"><i class="fa fa-refresh"></i>update</span>update...</li>
            <li><span class="issue improve"><i class="fa fa-gear"></i>improve</span>improve responsive...</li>
        </ul>
    </div>
</div>
<div class="logs-wrap tpl-born">
    <h4>version 1.0</h4>
    <div class="logs-detail">
        <ul>
            <li><span class="issue release"><i class="fa fa-rocket"></i>new</span>first realse</li>
        </ul>
    </div>
</div>
  • I find this question to be Unclear. See Zollie's comment and please clarify your issue. – mickmackusa Jan 12 at 23:03
0

The speed is not relevant here at all in this question. Use the textarea field.

In the field attributes use filter=“raw” to preserve html tags after submission.

First I thought that this is a very hollow question. After few comments, the reasoning of the question got a bit clearer. However it is not a good enough reasoning that “some people said something somewhere about a subject of input fields generally a long time ago and we all remember that”.

So:

Some people few times mentioned years ago somewhere that custom fields in Joomla can slow down a site. But the facts are, if you investigate those cases, that in those particular cases they talked about 30, 40 or even more custom fields in 1 Joomla article where on the top of those, an extension or two were fetching and scanning the sites with complicated regex filters and on the top of those, the fields were saved in database with wrongly built queries (field by field with one separated query for example) in wrongly built html Forms. And on the top of this the whole thing was running on PHP 5.x and if it is not enough, they mentioned the speed problem if they load many many of these articles in a category list view only.

You cannot just apply this extreme, clueless example on an HTML form field which is created by Joomla. You absolutely cannot blame Joomla and form fields regarding this question and cannot really evaluate this question based on these few special individual experience. The basic reason of slowing down a site with text is primarily can come only from abusing the database with wrongly built queries where the amount of database access is not considered at site load and it can cause really stupid speed problem (only for few people). With 100-200 lines of text in a textfield you cannot slow a server, there is no way for that.

So if you just need an HTML form field for text input, then use the textarea field without even thinking about the above.

If you want to provide editing capabilities for the field, then use editor field with codemirror editor for example (which means a very light editor). And you will not really experience any problem (only few milliseconds different maximum). But I still recommend textarea if the operator do not need editing.

In your particular case, speed is not a factor of decision. The purpose and the function of the input field is the decision factor of choice.

  • I did not feel slow yet, but in this post, the user said his site was slowing down – niaziblog Jan 12 at 21:38
  • Link post : stackoverflow.com/questions/45330533/… – niaziblog Jan 12 at 21:39
  • thanks alot for reply :)...i use php 7.2 and latest joomla and not use any plugin at joomla article .. But since some people said it would slow down, I asked this question. Also, in the textarea field, codes would be up to 150 lines.So, I use the Textarea field and there is no problem? – niaziblog Jan 13 at 13:43
  • I updated my answer on this for you, I hope it’s clearing this for you more. – Zollie Jan 13 at 14:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.