<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Ticket search results</title><link>https://forge-allura.apache.org/p/allura/tickets/</link><description>You searched for labels:"performance"</description><language>en</language><lastBuildDate>Thu, 14 Sep 2023 18:51:37 -0000</lastBuildDate><item><title>ForgeMarkdown speedup</title><link>https://forge-allura.apache.org/p/allura/tickets/8497/</link><description>`g.forge_markdown` constructs a new `ForgeMarkdown` with a lot of extensions every time it is used.  This can be a bit expensive.  Re-using the same instance would probably require updates/fixes to some of our custom extensions.  But lots of times `cached_convert` is used and gets a cached result so a full Markdown instance doesn't even need to be created then.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Dave Brondsema</dc:creator><pubDate>Thu, 14 Sep 2023 18:51:37 -0000</pubDate><guid>https://forge-allura.apache.org/p/allura/tickets/8497/</guid></item><item><title>optimize more discussion thread queries</title><link>https://forge-allura.apache.org/p/allura/tickets/8422/</link><description>followup to [#4359]  Like it did with backrefs can we consolidate queries for:

- `ForumAttachment` queries
- additional `ArtifactReference` queries, maybe these are regular ("forward") references from `def related_artifacts` calling `self.refs`

</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Dave Brondsema</dc:creator><pubDate>Fri, 23 Sep 2022 16:10:19 -0000</pubDate><guid>https://forge-allura.apache.org/p/allura/tickets/8422/</guid></item><item><title>Use regex library instead of re</title><link>https://forge-allura.apache.org/p/allura/tickets/8416/</link><description>This helps performance issues with certain markdown content &amp; pattern matching</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Dave Brondsema</dc:creator><pubDate>Fri, 23 Sep 2022 16:10:18 -0000</pubDate><guid>https://forge-allura.apache.org/p/allura/tickets/8416/</guid></item><item><title>Markdown performance mitigation</title><link>https://forge-allura.apache.org/p/allura/tickets/8410/</link><description>Some markdown text can be very slow to process with the `FORGE_LINK_RE` regexes we're using.  Long-term we should look at using markdown's `InlineProcessor` instead of `Pattern` for `ForgeLinkPattern` but we can mitigate it pretty well with a small regex tweak</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Dave Brondsema</dc:creator><pubDate>Fri, 23 Sep 2022 16:10:18 -0000</pubDate><guid>https://forge-allura.apache.org/p/allura/tickets/8410/</guid></item><item><title>Speed up anonymous user handling</title><link>https://forge-allura.apache.org/p/allura/tickets/8409/</link><description>For every logged-out request, `authenticate_request` does a User query with username None, which is pointless and never finds anything.

It also calls `M.User.anonymous()` which maybe could be in memory instead of a database lookup?  Could speed up lots of other calls to anonymous() too.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Dave Brondsema</dc:creator><pubDate>Fri, 23 Sep 2022 16:10:18 -0000</pubDate><guid>https://forge-allura.apache.org/p/allura/tickets/8409/</guid></item><item><title>Max file sizes for displaying/downloading from repo</title><link>https://forge-allura.apache.org/p/allura/tickets/8381/</link><description>Similar to [#8332] (limiting max size for syntax highlighting) set some overall max sizes.  Downloading with `?format=raw` can be a higher limit, I've found reading files from a repo is generally quite fast, but rendering them into an html template (even with syntax highlighting omitted) can be slow for very large files.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Dave Brondsema</dc:creator><pubDate>Mon, 17 May 2021 15:07:02 -0000</pubDate><guid>https://forge-allura.apache.org/p/allura/tickets/8381/</guid></item><item><title>Misc performance improvements, icon CDN support</title><link>https://forge-allura.apache.org/p/allura/tickets/8360/</link><description/><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Dave Brondsema</dc:creator><pubDate>Mon, 17 May 2021 15:07:02 -0000</pubDate><guid>https://forge-allura.apache.org/p/allura/tickets/8360/</guid></item><item><title>stopforumspam performance improvement</title><link>https://forge-allura.apache.org/p/allura/tickets/8359/</link><description/><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Dave Brondsema</dc:creator><pubDate>Mon, 17 May 2021 15:07:02 -0000</pubDate><guid>https://forge-allura.apache.org/p/allura/tickets/8359/</guid></item><item><title>Fix slowness on large diffs</title><link>https://forge-allura.apache.org/p/allura/tickets/8341/</link><description>Similar to [#8332] but for diffs</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Dave Brondsema</dc:creator><pubDate>Mon, 17 May 2021 15:07:01 -0000</pubDate><guid>https://forge-allura.apache.org/p/allura/tickets/8341/</guid></item><item><title>Fix slowness on some large files in code repos</title><link>https://forge-allura.apache.org/p/allura/tickets/8332/</link><description>Huge files (like 8MB) in code repos can generate very slow timings like this (from timermiddleware stats.log):
```
{
    "level": "INFO ",
    "message": {
        "call_counts": {
            "git_tool.__init__": 1,
            "git_tool._get_refs": 2,
            "git_tool._object": 2,
            "git_tool.blob_size": 1,
            "git_tool.commit": 1,
            "git_tool.is_empty": 3,
            "git_tool.open_blob": 1,
            "git_tool.shorthand_for_commit": 2,
            "git_tool.url_for_commit": 23,
            "jinja": 1,
            "ming": 222,
            "mongo": 170,
            "repo.Blob.__init__": 2,
            "repo.Blob.open": 1,
            "repo.Blob.path": 3,
            "repo.Commit.__repr__": 3,
            "repo.Commit.get_tree": 1,
            "repo.Commit.set_context": 1,
            "repo.Commit.shorthand_id": 2,
            "repo.Commit.url": 2,
            "repo.Tree.__getitem__": 2,
            "repo.Tree.__repr__": 3,
            "repo.Tree.get_blob": 1,
            "repo.Tree.path": 3,
            "repo.Tree.set_context": 2,
            "sidebar": 1,
            "sqlalchemy": 2,
            "total": 1
        },
        "request_category": "git",
        "timings": {
            "git_tool.__init__": 0,
            "git_tool._get_refs": 0,
            "git_tool._object": 1105,
            "git_tool.blob_size": 485,
            "git_tool.commit": 116,
            "git_tool.is_empty": 1191,
            "git_tool.open_blob": 1959,
            "git_tool.shorthand_for_commit": 0,
            "git_tool.url_for_commit": 1,
            "jinja": 524566,
            "ming": 2929,
            "mongo": 3029,
            "repo.Blob.__init__": 0,
            "repo.Blob.open": 1959,
            "repo.Blob.path": 0,
            "repo.Commit.__repr__": 0,
            "repo.Commit.get_tree": 191,
            "repo.Commit.set_context": 0,
            "repo.Commit.shorthand_id": 0,
            "repo.Commit.url": 0,
            "repo.Tree.__getitem__": 4,
            "repo.Tree.__repr__": 0,
            "repo.Tree.get_blob": 0,
            "repo.Tree.path": 0,
            "repo.Tree.set_context": 0,
            "sidebar": 3559,
            "sqlalchemy": 238,
            "total": 528318
        },
        "uptime": 3592,
        "url": "/p/mingw-w64/mingw-w64/ci/8331eb05125cb7fd26462b9be0a772f8d29ccf13/tree/mingw-w64-crt/Makefile.in"
    },
    "name": "stats",
    "time": "2019-08-23 12:45:01,270"
}
```</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Dave Brondsema</dc:creator><pubDate>Fri, 04 Oct 2019 21:42:55 -0000</pubDate><guid>https://forge-allura.apache.org/p/allura/tickets/8332/</guid></item><item><title>Really big artifact_feed queries</title><link>https://forge-allura.apache.org/p/allura/tickets/8272/</link><description>Some discussions with lots of threads can cause artifact_feed queries that are huge, like this:

```
2019-03-12T23:38:23.950+0000 I COMMAND  [conn6349421] warning: log line attempted (3226kB) over max size (10kB), printing beginning and end ... query project-data.artifact_feed query: { $query: { ref_id: { $in: [ "forgediscussion/model/forum/ForumThread#00841475", "forgediscussion/model/forum/ForumThread#00c62d67", "forgediscussion/model/forum/ForumThread#007b66b8", "forgediscussion/model/forum/ForumThread#00c67d7c", "forgediscussion/model/forum/ForumThread#00c84065", "forgediscussion/model/forum/ForumThread#004372fb", "forgediscussion/.......... /ForumThread#2f8fe61bcb", "forgediscussion/model/forum/ForumThread#e255b209ec", "forgediscussion/model/forum/ForumThread#cf784149a4", "forgediscussion/model/forum/ForumThread#94d83cb848", "forgediscussion/model/forum/ForumThread#eb607a976b", "forgediscussion/model/forum/ForumThread#48a736ec01", "forgediscussion/model/forum/ForumThread#706e08a2b4", "forgediscussion/model/forum/ForumThread#a8b9ad8eaf", "forgediscussion/model/forum/ForumThread#8eaf24bc77", "forgediscussion/model/forum/ForumThread#32d92622f7" ] } }, $orderby: { pubdate: -1 } } planSummary: IXSCAN { ref_id: 1, pubdate: -1 }, IXSCAN { ref_id: 1, pubdate: -1 } cursorid:421910004086 ntoreturn:10 ntoskip:0 keysExamined:52445 docsExamined:8252 hasSortStage:1 keyUpdates:0 writeConflicts:0 numYields:411 nreturned:10 reslen:9110 locks:{ Global: { acquireCount: { r: 824 } }, Database: { acquireCount: { r: 412 } }, Collection: { acquireCount: { r: 412 } } } 1758ms
```
</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Dave Brondsema</dc:creator><pubDate>Mon, 17 Jun 2019 15:19:14 -0000</pubDate><guid>https://forge-allura.apache.org/p/allura/tickets/8272/</guid></item><item><title>Compute merge request commits in background</title><link>https://forge-allura.apache.org/p/allura/tickets/8214/</link><description>We added caching to merge requests' list of commits previously (`allura.model.repository.MergeRequest#commits`).  But it still can sometimes be slow the very first time.  This is particularly a problem when creating the merge request and there's been no chance for it to get cached.  

* if 'commits' are available (cached), show them on the page just like we do now
* if they aren't, return the page without them.
* start a background task to get them
* use ajax to fetch the bg tasks results when complete, and insert them into the page

There is a similar pattern in place already for seeing if the commits are cleanly mergeable (see "merge_task_status")</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Dave Brondsema</dc:creator><pubDate>Mon, 24 Sep 2018 19:36:24 -0000</pubDate><guid>https://forge-allura.apache.org/p/allura/tickets/8214/</guid></item><item><title>Fix slow forum listings</title><link>https://forge-allura.apache.org/p/allura/tickets/8189/</link><description>The forum listings page can be very slow to load when there are a large number of topics.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Kenton Taylor</dc:creator><pubDate>Wed, 14 Mar 2018 19:42:19 -0000</pubDate><guid>https://forge-allura.apache.org/p/allura/tickets/8189/</guid></item><item><title>Config options for some scm limit params</title><link>https://forge-allura.apache.org/p/allura/tickets/8188/</link><description>On repos, the commit browse page and log page hit disk the most, so it would be useful to have config options to control the default limits for those.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Dave Brondsema</dc:creator><pubDate>Wed, 14 Mar 2018 19:42:19 -0000</pubDate><guid>https://forge-allura.apache.org/p/allura/tickets/8188/</guid></item><item><title>Reduce gridfs index creation</title><link>https://forge-allura.apache.org/p/allura/tickets/8109/</link><description>The `File` class creates a `GridFS` for basically any operation.  This includes viewing any attachment, thumbnail, project icon, project screenshot etc.  The pymongo GridFS code creates an index on `{ files_id: 1, n: 1 }` every time (with a little caching from going through `ensure_index`) which is a really unnecessary.  Pymongo 3.1 avoids all that index creation (see [here](http://api.mongodb.com/python/current/api/gridfs/index.html) but we aren't able to upgrade to pymongo 3.x since Ming doesn't support it yet: see https://sourceforge.net/p/merciless/bugs/27/ and  https://sourceforge.net/p/merciless/mailman/merciless-discuss/thread/CAJfq2JEicmKpwb31uN1ju%3D1jS0bVDS6fGVjk3n-dpL-BEFX3fg%40mail.gmail.com/#msg34734599 

We can work around it a little bit for the `GridFS()` constructor on 2.x  But the index will still be created on deletes and writes (within the `GridIn` class)</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Dave Brondsema</dc:creator><pubDate>Thu, 28 Jul 2016 20:48:46 -0000</pubDate><guid>https://forge-allura.apache.org/p/allura/tickets/8109/</guid></item><item><title>Collections missing indexes from ensure_index cmd</title><link>https://forge-allura.apache.org/p/allura/tickets/8068/</link><description>The `ensure_index` paster command misses some indexes:

`CommitRunDoc` which uses the `repo_commitrun` collection doesn't get its indexes created, because there is no `mapper(...)` line for it at the bottom of `allura/Allura/allura/model/repository.py`.   (There is no class to map it to currently)

Also the activitystream indexes on `activities` and `nodes` don'te get created, despite code in `EnsureIndexCommand` that uses `activity_odm_session` to try to do so.  Must be a bug in it.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Dave Brondsema</dc:creator><pubDate>Thu, 17 Mar 2016 15:18:04 -0000</pubDate><guid>https://forge-allura.apache.org/p/allura/tickets/8068/</guid></item><item><title>Too many cached_branches/tags</title><link>https://forge-allura.apache.org/p/allura/tickets/8019/</link><description>Some repos can get a large number of cached branches or tags.  The large lists cause a ming performance penalty:  e.g. one request timing had 296ms in mongo, 2304ms in ming.

This is particular true for the sidebar when it hits `repo.forks` property (twice), which loads many repo objects into memory.   We could look into ways to not load those fields when not needed, or skip ming validation on them (see `validate_ranges` option of ming `Array`).  Or just querying for a count and not getting the objects at all.  Or cap the size of the lists.

From forge-allura's own mongo, look at the size of these cached branches lists:

~~~~
&gt; db['git-repository'].find({}).forEach(function(u) { print(u.cached_branches &amp;&amp; u.cached_branches.length, u.url_path) });
undefined /p/test/
undefined /u/masterbunnyfu/
undefined /u/shujisado/
undefined /p/allura/
0 /u/swelltt/
undefined /u/mtem/
undefined /u/barki2015/
0 /p/allura/
0 /u/dnayak/
24 /u/brondsem/
776 /p/allura/
547 /u/saintaardvark/
725 /u/lxj/
550 /u/testmr/
550 /u/vansteenburgh/
583 /u/alexluberg/
543 /u/masterbunnyfu/
643 /u/jetmind/
649 /u/heiths/
577 /u/shujisado/
641 /u/mishravikas/
695 /u/yesidid180/
758 /u/jredd/
776 /u/pranav/
~~~~</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Dave Brondsema</dc:creator><pubDate>Wed, 24 Feb 2016 19:32:39 -0000</pubDate><guid>https://forge-allura.apache.org/p/allura/tickets/8019/</guid></item><item><title>Large timeline performance issue in activity stream</title><link>https://forge-allura.apache.org/p/allura/tickets/8006/</link><description>When an activity happens on a project and the `create_timelines` task is run, that executes ActivityStream's `Aggregator.create_timeline`.  In a case where there are no new records for some reason, then it calls `get_timeline`.  This can be a problem because the pre-computed "timeline" there could potentially be thousands or millions of records.  This takes a while and can take up a ton of memory which doesn't get reclaimed after the task is done.

We should evaulate if that behavior is correct.  If it is needed, we should pass a `limit` parameter in.

Also perhaps see if we can figure out why these records aren't being garbage collected.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Dave Brondsema</dc:creator><pubDate>Thu, 12 May 2016 18:51:47 -0000</pubDate><guid>https://forge-allura.apache.org/p/allura/tickets/8006/</guid></item><item><title>Speed up commit view by disabling copy detection by default  -- NEEDS INI</title><link>https://forge-allura.apache.org/p/allura/tickets/7963/</link><description>Currently git and mercurial detect copies when viewing commits.  This adds a significant amount of time to each request and is not a common enough occurrence to justify such a large performance hit on every view. 

But we should also probably add an option in the .ini that gives the option to enable copy detection (noting the performance penalty).


[#7925]</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Heith Seewald</dc:creator><pubDate>Mon, 24 Aug 2015 14:29:16 -0000</pubDate><guid>https://forge-allura.apache.org/p/allura/tickets/7963/</guid></item><item><title>Cache mercurial branch &amp; tag info</title><link>https://forge-allura.apache.org/p/allura/tickets/7961/</link><description>Like [#7873] did for git, cache branch &amp; tag info from Mercurial.  Existing code from [#7873] probably could be re-used be refactoring it up into common repo code.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Dave Brondsema</dc:creator><pubDate>Tue, 11 Aug 2015 20:34:49 -0000</pubDate><guid>https://forge-allura.apache.org/p/allura/tickets/7961/</guid></item><item><title>Fix pagination issue in the commit browser</title><link>https://forge-allura.apache.org/p/allura/tickets/7932/</link><description>The `index` method on `allura.controllers.repository.CommitBrowser` has an issue where every page from the pagination consists of an identical copy of the entire list.

so **?page=2** is the same as **?page=10** and they both contain a full (non-paged) version of the changes.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Heith Seewald</dc:creator><pubDate>Mon, 27 Jul 2015 14:35:07 -0000</pubDate><guid>https://forge-allura.apache.org/p/allura/tickets/7932/</guid></item><item><title> Speed up diff processing with binary files</title><link>https://forge-allura.apache.org/p/allura/tickets/7925/</link><description>In a git repo with a large amount of binary files, our diff processing can be very inefficient. We should test if a file is binary and exclude it from the diff processing section.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Heith Seewald</dc:creator><pubDate>Mon, 10 Aug 2015 14:27:58 -0000</pubDate><guid>https://forge-allura.apache.org/p/allura/tickets/7925/</guid></item><item><title>Speedup create-allura-sitemap task</title><link>https://forge-allura.apache.org/p/allura/tickets/7914/</link><description>From [docs](https://forge-allura.apache.org/docs/getting_started/administration.html#create-allura-sitemap-py):
&gt; This takes a while to run on a prod-sized data set. There are a couple of things that would make it faster, if we need/want to.
&gt; 
&gt; 1. Monkeypatch `forgetracker.model.ticket.Globals.bin_count` to skip the refresh (Solr search) and just return zero for everything, since we don’t need bin counts for the sitemap.
&gt; 2. Use multiprocessing to distribute the offsets to n subprocesses.

Remove speedup suggestions from docs when this is ready.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Igor Bondarenko</dc:creator><pubDate>Thu, 09 Jul 2015 08:42:14 -0000</pubDate><guid>https://forge-allura.apache.org/p/allura/tickets/7914/</guid></item><item><title>Improve markdown logic for cached vs threshold limits</title><link>https://forge-allura.apache.org/p/allura/tickets/7889/</link><description>The `markdown_render_max_length` param is an absolute limit to how big something can be for markdown conversion.  But `cached_convert()` was added later and is a better approach.  E.g. a very large ticket only has to get converted once and then its good, so a `markdown_render_max_length` isn't needed (we even have it set very high in development.ini because of this).

However, not all markdown conversions go through `cached_convert()`, for example, commit messages, outbound email bodies, or markdown files in repos.

So we should have `markdown_render_max_length` apply only to non-cached conversions and change its default value to something not so extremely high, maybe 100000.  Or possibly introduce a second option, one for cached and one for non-cached conversions.  Or develop a new caching mechanism that works for markdown text that isn't part of an artifact.

An example I came across was thousands of lines like this in the commit message itself, totaling around 500k chars:

~~~~
   renamed: ts/5.1/fastboot/fastboot-mangle -&gt; ts/5.2/fastboot/fastboot-mangle                                                                                                                             
   renamed: ts/5.1/fastboot/lib-boot -&gt; ts/5.2/fastboot/lib-boot                                                                                                                                           
   renamed: ts/5.1/fastboot/lib-rw -&gt; ts/5.2/fastboot/lib-rw                                                                                                                                               
   renamed: ts/5.1/fastboot/usr-rw -&gt; ts/5.2/fastboot/usr-rw                                                                                                                                               
   renamed: ts/5.1/kernel/alias/acpi -&gt; ts/5.2/kernel/alias/acpi                                                                                                                                           
   renamed: ts/5.1/kernel/alias/pcm -&gt; ts/5.2/kernel/alias/pcm              
~~~~</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Dave Brondsema</dc:creator><pubDate>Mon, 29 Jun 2015 14:23:15 -0000</pubDate><guid>https://forge-allura.apache.org/p/allura/tickets/7889/</guid></item></channel></rss>